Revert the collection event forwarding during get.
This is actually handled during the observe phase, via sightglass. This reverts commit cd003e69.
Showing
1 changed file
with
1 additions
and
13 deletions
... | @@ -37,19 +37,7 @@ define(function(require) { | ... | @@ -37,19 +37,7 @@ define(function(require) { |
37 | } else { | 37 | } else { |
38 | return; | 38 | return; |
39 | } | 39 | } |
40 | var value = obj.get(keypath); | 40 | return obj.get(keypath); |
41 | if (value instanceof Collection) { | ||
42 | var listener = function() { | ||
43 | var currentValue = obj.get(keypath); | ||
44 | if (value !== currentValue) { | ||
45 | obj.stopListening(value, collectionEvents, listener); | ||
46 | return; | ||
47 | } | ||
48 | obj.trigger('change:' + keypath, obj, currentValue); | ||
49 | }; | ||
50 | obj.listenTo(value, collectionEvents, listener); | ||
51 | } | ||
52 | return value; | ||
53 | }, | 41 | }, |
54 | set: function set(obj, keypath, value) { | 42 | set: function set(obj, keypath, value) { |
55 | if (obj instanceof Model) { | 43 | if (obj instanceof Model) { | ... | ... |
-
Please register or sign in to post a comment