1
0
Fork 0

Constant config options have no type

This commit is contained in:
Joost De Cock 2018-08-11 15:05:40 +02:00
parent f0ae740e45
commit 1c4507c5bd

View file

@ -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;
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