Brad Parks
Brad Parks

Reputation: 71961

Uncaught type mismatch error: the type of an object was incompatible with the expected type of the parameter associated to the object

I'm running some javascript in Node Webkit and get the following error:

uncaught type mismatch error: the type of an object was incompatible with the expected type of the parameter associated to the object

I don't think it's Node webkit specific.... I think this is just a javascript error message that is hard to understand!

What does this mean?

Upvotes: 1

Views: 3171

Answers (1)

Brad Parks
Brad Parks

Reputation: 71961

In my situation, I was passing the wrong type of object to a function.

For example, I was calling a function like so:

test(a,b,c);

For c, I was passing a string, when I should have been passing an array.

So this may pop up for you when your passing the wrong type of object to a function.

For example:

  • you should be passing an array - you pass a string
  • you should be passing an object - you pass an integer

Upvotes: 1

Related Questions