1
0
Fork 0

sparkles: Using new mergeSettings method in constructor

This commit is contained in:
Joost De Cock 2018-12-11 19:17:50 +01:00
parent 29a5a37b93
commit 30433d26ce

View file

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