Fix size/cache busting in object.set

master
Sven Slootweg 7 years ago
parent 1e76f05549
commit 0049bb9a53

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

Loading…
Cancel
Save