✨ Constant config options have no type
This commit is contained in:
parent
f0ae740e45
commit
1c4507c5bd
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue