Skip to content

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

@alexdn

Description

@alexdn

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions