Permalink
Browse files

Update DataView to only mixin observable if it isnt already

  • Loading branch information...
1 parent b3985a2 commit 80ce6b6f945458d5eb128cd95f74ca019233df3c @robrobbins robrobbins committed Jun 28, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 build/debug/sudo-x.js
  2. +2 −2 extras/dataview/dataview.js
@@ -846,8 +846,8 @@ sudo.DataView = function(el, data) {
sudo.View.call(this, el, d);
// implements the listener extension
$.extend(this, sudo.extensions.listener);
- // dataview's models are observable
- $.extend(this.model, sudo.extensions.observable);
+ // dataview's models are observable, make it so if not already
+ if(!this.model.observe) $.extend(this.model, sudo.extensions.observable);
// dont autoRender on the setting of events,
// add to this to prevent others if needed
this.autoRenderBlacklist = {event: true, events: true};
@@ -17,8 +17,8 @@ sudo.DataView = function(el, data) {
sudo.View.call(this, el, d);
// implements the listener extension
$.extend(this, sudo.extensions.listener);
- // dataview's models are observable
- $.extend(this.model, sudo.extensions.observable);
+ // dataview's models are observable, make it so if not already
+ if(!this.model.observe) $.extend(this.model, sudo.extensions.observable);
// dont autoRender on the setting of events,
// add to this to prevent others if needed
this.autoRenderBlacklist = {event: true, events: true};

0 comments on commit 80ce6b6

Please sign in to comment.