fe5297ea by Adam Heath

In rivetsBinderCall, allow for binders that are pure functions(which

means they only implement routine()).

Refs: #7680
1 parent 02861f93
......@@ -2,12 +2,20 @@ define(function(require) {
'use strict';
var module = require('module');
var rivets = require('rivets');
var _ = require('underscore');
var Backbone = require('backbone');
var $ = require('jquery');
var rivetsBinderCall = function(binding, binderName, methodName, args) {
var binder = rivets.binders[binderName];
var method = binder[methodName];
if (_.isFunction(binder)) {
if (methodName === 'routine') {
binder.apply(binding, args);
}
} else {
binder[methodName].apply(binding, args);
}
};
var render = function(el, cmd, errorList) {
......