diff --git a/src/pattern.js b/src/pattern.js index 6a429e31786..e685dd4b5b5 100644 --- a/src/pattern.js +++ b/src/pattern.js @@ -37,8 +37,13 @@ export default function Pattern(config = false) { this.config = { ...defaults, ...config }; for (let i in config.options) { let option = config.options[i]; - if (typeof option.type === "undefined") this.options[i] = option.val / 100; - else this.options[i] = option.val; + if (typeof option === "object") { + if (typeof option.type === "undefined") + this.options[i] = option.val / 100; + else this.options[i] = option.val; + } else if (typeof option === "number") { + this.options[i] = option; + } } // Constructors