From ce8b79c563988b7276a164c2879370d3f2cdd47b Mon Sep 17 00:00:00 2001 From: Lebugg Date: Fri, 12 Feb 2016 15:06:39 +0100 Subject: [PATCH] Do not confuse Model instance with plain objects --- backbone-nested.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone-nested.js b/backbone-nested.js index 01d2532..fb38475 100644 --- a/backbone-nested.js +++ b/backbone-nested.js @@ -268,7 +268,7 @@ } // Trigger Change Event if new values are being set - if (!opts.silent && _.isObject(newValue) && isNewValue){ + if (!opts.silent && _.isObject(newValue) && !newValue instanceof Backbone.Model && isNewValue){ var visited = []; var checkChanges = function(obj, prefix) { // Don't choke on circular references