Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message: ko.bindingHandlers[command].init is not a function #52

Open
alexdn opened this issue Jul 28, 2016 · 0 comments
Open

Message: ko.bindingHandlers[command].init is not a function #52

alexdn opened this issue Jul 28, 2016 · 0 comments

Comments

@alexdn
Copy link

alexdn commented Jul 28, 2016

Hi,

When extending Object prototype before applying binding, then the exception happens during the binding process:
Exception:
VM548 knockout-debug.js:3326 Uncaught TypeError: Unable to process binding "command: function (){return test }"
Message: ko.bindingHandlers[command].init is not a function

Jsfiddle: https://jsfiddle.net/6gv62tge/

As I found, the issue is in knockout.command.js file on lines 97 and 115. Instead of relying on isBindingHandler(command) only, I think it should also check commands.hasOwnProperty(command).

Whoever can fix it in branch, please do it :)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant