From ab64d079aa5accabf58e25d8ad70f49b2b5484c2 Mon Sep 17 00:00:00 2001 From: Koenkk Date: Sat, 2 Jun 2018 19:11:49 +0200 Subject: [PATCH] Don't mutate stateCache. #82 --- lib/controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/controller.js b/lib/controller.js index ba3288b77..e472f4021 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -389,7 +389,7 @@ class Controller { if (cacheState) { // Add cached state to payload if (this.stateCache[deviceID]) { - payload = objectAssignDeep(this.stateCache[deviceID], payload); + payload = objectAssignDeep.noMutate(this.stateCache[deviceID], payload); } // Update state cache with new state.