summaryrefslogtreecommitdiff
path: root/scripts/generate-style-code.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generate-style-code.js')
-rwxr-xr-xscripts/generate-style-code.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js
index 2622ae5ef6..5145755cec 100755
--- a/scripts/generate-style-code.js
+++ b/scripts/generate-style-code.js
@@ -153,7 +153,11 @@ global.defaultValue = function (property) {
switch (property.type) {
case 'number':
+ if (property.default === undefined) {
+ return 0;
+ } else {
return property.default;
+ }
case 'formatted':
case 'string':
return JSON.stringify(property.default || "");