Fixes #3958 - Opening organization views throws console traces.
This commit is contained in:
parent
0b449839ea
commit
5707517181
1 changed files with 4 additions and 3 deletions
|
@ -51,15 +51,16 @@ class App.ControllerObserver extends App.Controller
|
||||||
hasChanged: (object) =>
|
hasChanged: (object) =>
|
||||||
currentAttributes = {}
|
currentAttributes = {}
|
||||||
|
|
||||||
|
objectCloned = $.extend(true, {}, object)
|
||||||
if @observe
|
if @observe
|
||||||
for key, active of @observe
|
for key, active of @observe
|
||||||
if active && !_.isFunction(value)
|
if active && !_.isFunction(value)
|
||||||
currentAttributes[key] = clone(object[key])
|
currentAttributes[key] = objectCloned[key]
|
||||||
|
|
||||||
if @observeNot
|
if @observeNot
|
||||||
for key, value of object
|
for key, value of objectCloned
|
||||||
if key isnt 'cid' && !@observeNot[key] && !_.isFunction(value)
|
if key isnt 'cid' && !@observeNot[key] && !_.isFunction(value)
|
||||||
currentAttributes[key] = clone(value)
|
currentAttributes[key] = value
|
||||||
|
|
||||||
if !@lastAttributes
|
if !@lastAttributes
|
||||||
@lastAttributes = currentAttributes
|
@lastAttributes = currentAttributes
|
||||||
|
|
Loading…
Reference in a new issue