From 570751718173eed295c5b1784398486ff379f285 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Thu, 10 Feb 2022 13:10:17 +0100 Subject: [PATCH] Fixes #3958 - Opening organization views throws console traces. --- .../controllers/_application_controller/observer.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller/observer.coffee b/app/assets/javascripts/app/controllers/_application_controller/observer.coffee index cc9a34a64..a50b3915f 100644 --- a/app/assets/javascripts/app/controllers/_application_controller/observer.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller/observer.coffee @@ -51,15 +51,16 @@ class App.ControllerObserver extends App.Controller hasChanged: (object) => currentAttributes = {} + objectCloned = $.extend(true, {}, object) if @observe for key, active of @observe if active && !_.isFunction(value) - currentAttributes[key] = clone(object[key]) + currentAttributes[key] = objectCloned[key] if @observeNot - for key, value of object + for key, value of objectCloned if key isnt 'cid' && !@observeNot[key] && !_.isFunction(value) - currentAttributes[key] = clone(value) + currentAttributes[key] = value if !@lastAttributes @lastAttributes = currentAttributes