From f44f95fbf2da8bab44dc0c58107d412417bdb6f7 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 22 Aug 2017 07:05:26 +0200 Subject: [PATCH] Don't cache-bust twice when the size of an object is busted --- src/create-object.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/create-object.js b/src/create-object.js index e263108..18923c1 100644 --- a/src/create-object.js +++ b/src/create-object.js @@ -42,9 +42,7 @@ module.exports = function createObject(options) { /* If the size changes, the cache should also be implicitly busted. */ this.bustSize(); this.bustCache(); - } - - if (Object.keys(transformedProperties).some(property => this.cacheBustingProperties.includes(property))) { + } else if (Object.keys(transformedProperties).some(property => this.cacheBustingProperties.includes(property))) { this.bustCache(); } },