You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i was just testing out kb to see if it is useful for our project.
But at the first try i got this weird issue.
when i have a backbone model with an attribute called url it fails with an undefined is not a function at line 1217 in knockback.js
The function in your code is: kb.getValue = function(model, key, args) {
var _ref;
if (!model) {
return;
}
if (_.isFunction(model[key]) && ((_ref = kb.orm) != null ? _ref.useFunction(model, key) : void 0)) {
return model[key]();
}
if (!args) {
return model.get(key);
}
return model.get.apply(model, _.map([key].concat(args), function(value) {
return kb.peek(value);
}));
};
I suspect it is related to the _ref.useFunction call.
I'm using Backbone Associations, but not in this particular model.
I also tried calling it like this (where m is the original model)
this.view_model = kb.viewModel( new Backbone.Model(m.toJSON()) );
but it still fails, unless i call the url attribute something else.
The text was updated successfully, but these errors were encountered:
Hi, i was just testing out kb to see if it is useful for our project.
But at the first try i got this weird issue.
when i have a backbone model with an attribute called
url
it fails with anundefined is not a function at line 1217 in knockback.js
I suspect it is related to the
_ref.useFunction
call.I'm using Backbone Associations, but not in this particular model.
I also tried calling it like this (where
m
is the original model)but it still fails, unless i call the
url
attribute something else.The text was updated successfully, but these errors were encountered: