Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem with nullable property of object

0
0
Hi ifle,

It looks like the code above fails because this line:
getName = person.Name
can't handle the case where person.Name returns nothing, and that's because nothing is a special object reference that requires a set statement rather than simple assignment. Is that your understanding as well?

Without MarshalNullAsDispatch option the getName() function return Undefined object. Is it behavior by design?

Hmm, we're not seeing that behavior. Without MarshalNullAsDispatch we get:
Person name is ''
Have you made any modifications to ClearScript that could have changed the behavior?

Thanks!

Viewing all articles
Browse latest Browse all 2297