From 0049bb9a53ee29a646fa4e2f8f0e447f64b3dd56 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 5 Mar 2017 21:43:18 +0100 Subject: [PATCH] Fix size/cache busting in object.set --- src/create-object.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }