diff --git a/dev/config.js b/dev/config.js index c98ef72..0499478 100644 --- a/dev/config.js +++ b/dev/config.js @@ -64,11 +64,11 @@ module.exports = [ { "type": "slider", "messageKey": "slider", - "defaultValue": 15, + "defaultValue": 0, "label": "Slider", "description": "This is the description for the slider", - "min": 10, - "max": 20, + "min": 0, + "max": 30, "step": 0.25 }, { diff --git a/src/scripts/lib/clay-config.js b/src/scripts/lib/clay-config.js index 743f40c..0a31610 100644 --- a/src/scripts/lib/clay-config.js +++ b/src/scripts/lib/clay-config.js @@ -86,9 +86,9 @@ function ClayConfig(settings, config, $rootContainer, meta) { // set the value of the item via the manipulator to ensure consistency var value = typeof _settings[_item.messageKey] !== 'undefined' ? _settings[_item.messageKey] : - (_item.defaultValue || ''); + _item.defaultValue; - clayItem.set(value); + clayItem.set(typeof value !== 'undefined' ? value : ''); $container.add(clayItem.$element); }