Skip to content

Commit

Permalink
FIx for mapping new model syntax in mapevent
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwasner committed Apr 14, 2016
1 parent 41f24d9 commit 8e881d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mvc/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,13 @@ var View = EventDispatcher.extend(function View(el, model, parentView) {
}

if (delegate === 'model') {
if (this.model && this.model instanceof Model) {
if (this.model && typeof this.model.$on === 'function') {
dotIndex = callbackType.indexOf('.');
if (dotIndex !== -1) {
property = callbackType.substr(dotIndex+1);
callbackType = callbackType.substr(0, dotIndex);
}
this.model.$on(callbackType + '.' + this.id, property, callback);
this.model.$on(callbackType + '.' + this.id, callback);
}
} else if (callbackType === 'animationEnd' && el.animationEnd) {
el.animationEnd(delegate, callback);
Expand Down

0 comments on commit 8e881d8

Please sign in to comment.