removed Function.bind() call

This commit is contained in:
Zolmeister 2014-08-26 16:30:02 -07:00
parent df39e1127f
commit f612ce4b2c

View file

@ -196,7 +196,15 @@ Mithril = m = new function app(window, undefined) {
} }
//schedule configs to be called. They are called after `build` finishes running //schedule configs to be called. They are called after `build` finishes running
if (typeof data.attrs["config"] === "function") { if (typeof data.attrs["config"] === "function") {
configs.push(data.attrs["config"].bind(window, node, !isNew, cached.configContext = cached.configContext || {}, cached)) var context = cached.configContext = cached.configContext || {}
// bind
configs.push((function (data, node, isNew, context, cached) {
var args = [node, !isNew, context, cached]
return function () {
return data.attrs["config"].apply(data, args.concat(Array.prototype.slice.call(arguments, 0)))
}
})(data, node, isNew, context, cached))
} }
} }
else if (typeof dataType != "function") { else if (typeof dataType != "function") {