|
|
@ -22,12 +22,12 @@ module.exports = function createObject(options) {
|
|
|
|
set: function setProperties(properties) {
|
|
|
|
set: function setProperties(properties) {
|
|
|
|
Object.assign(this, properties);
|
|
|
|
Object.assign(this, properties);
|
|
|
|
|
|
|
|
|
|
|
|
if (properties.some(property => this.sizeBustingProperties.includes(property))) {
|
|
|
|
if (Object.keys(properties).some(property => this.sizeBustingProperties.includes(property))) {
|
|
|
|
this.emit("bustedSize");
|
|
|
|
this.emit("bustedSize");
|
|
|
|
this.recalculateSize();
|
|
|
|
this.recalculateSize();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (properties.some(property => this.cacheBustingProperties.includes(property))) {
|
|
|
|
if (Object.keys(properties).some(property => this.cacheBustingProperties.includes(property))) {
|
|
|
|
this.emit("bustedCache");
|
|
|
|
this.emit("bustedCache");
|
|
|
|
this.isCached = false;
|
|
|
|
this.isCached = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|