diff --git a/src/create-object.js b/src/create-object.js index 4566610..891ebe7 100644 --- a/src/create-object.js +++ b/src/create-object.js @@ -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; }