sparkles: Using new mergeSettings method in constructor
This commit is contained in:
parent
29a5a37b93
commit
30433d26ce
1 changed files with 2 additions and 6 deletions
|
@ -13,12 +13,8 @@ const Brian = function(settings = false) {
|
||||||
freesewing.Pattern.call(this, { version: version, ...config });
|
freesewing.Pattern.call(this, { version: version, ...config });
|
||||||
// Load plugins
|
// Load plugins
|
||||||
this.with(pluginBundle);
|
this.with(pluginBundle);
|
||||||
// Inject settings passed to the constructor
|
// Merge settings passed to the constructor
|
||||||
if (settings !== false) {
|
if (settings !== false) this.mergeSettings(settings);
|
||||||
for (let key of Object.keys(settings)) {
|
|
||||||
this.settings[key] = settings[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue