Fixes #3958 - Opening organization views throws console traces.

This commit is contained in:
Rolf Schmidt 2022-02-10 13:10:17 +01:00
parent 0b449839ea
commit 5707517181

View file

@ -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