Right-hand side of 'instanceof' is not an object
xeroxstar opened this issue · comments
I am trying to run this module but i am getting an error, Right-hand side of 'instanceof' is not an object
and i had to remove this line to make it work again:
if (target instanceof Date || target instanceof Error) {
throw new Error(`${target} found to be one of a on-observable types`);
}
Checking.
@xeroxstar can you please provide some info on your environment (if browser, then type and version, if other runtime - what is it and version)?
This kind of error can happen, IMHO, only when Date
or Error
object, which are pretty much standard ones on all modern browsers and Node, are not defined.
Thanks!
Hello,
I am still looking for the problem, surprisingly, it was working before on Node and on the Browser, I think the babel
has something to do with that, I will let you know when I will figure out. For now I just removed few lines from the code, and it's working.
Babel is a good place to look at - probably your transpilation target goes too far back or something like this.
Anyway, those lines are important :), so I'd suggest to have it working with them.
Let me know if you find anything or, please, close the issue if will become not relevant.
Closing this one, please reopen if any new info becomes available.