Skip to content

Operator instanceof does not work with subclasses #6

@aperezdc

Description

@aperezdc

This does work and prints true:

var A = Model();
var a = new A();
console.log(a instanceof A);

However, the following does not work as expected, and it prints false:

var A = Model();
var B = A.extend();
var b = new B();
console.log(b instanceof A);

Probably needs some fiddling with .prototype, but I haven't figured it out yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions