Skip to content

Commit 8d173c0

Browse files
author
gmac
committed
Fixing View.remove() method to pass along its arguments to super.
1 parent e8f0b3a commit 8d173c0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

backbone.epoxy.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@
843843
};
844844
}
845845

846-
847846
var bindingFilters = {
848847
// Positive collection assessment [read-only]:
849848
// Tests if all of the provided accessors are truthy (and).
@@ -1080,7 +1079,7 @@
10801079
// unbinds the view before performing native removal tasks.
10811080
remove: function() {
10821081
this.removeBindings();
1083-
viewSuper( this, 'remove' );
1082+
viewSuper( this, 'remove', arguments );
10841083
}
10851084

10861085
}, mixins);
@@ -1210,6 +1209,8 @@
12101209
if ( handlers.hasOwnProperty(handlerName) ) {
12111210
// Create and add binding to the view's list of handlers:
12121211
view.b().push( new EpoxyBinding($element, handlers[handlerName], accessor, events, context, bindings) );
1212+
} else {
1213+
throw( 'Handler does not exist: '+handlerName );
12131214
}
12141215
});
12151216
}
@@ -1218,7 +1219,7 @@
12181219
// used by the implementations of "getBinding" and "setBinding".
12191220
function accessViewContext( context, args, attribute, value ) {
12201221
if ( args.callee.caller && args.callee.caller.id === attribute ) {
1221-
throw( 'recursive access error: '+attribute );
1222+
throw( 'Recursive access error: '+attribute );
12221223
} else if ( context && context.hasOwnProperty(attribute) ) {
12231224
return isUndefined(value) ? readAccessor( context[attribute] ) : context[attribute](value);
12241225
}

0 commit comments

Comments
 (0)