Closed casieber closed 6 years ago
@casieber , let me know when you want me to merge in (i.e., whether you want to still tweak the error message handling, or just use it as is)
@Zlatkovsky I've tweaked it to better handle the "[object Object]" case using some of the snippet you sent over. Should be good to go now if you approve.
Awesome, thanks Colby!
UI.notify was using
if (body instanceof String)
to check if we had a string, but that only checks for the String type and not primitive strings (which is what you get withconst x = 'hello';
). This was causing a runtime error when you triedUI.notify('Please notify me!');
and would only work withUI.notify(new String('Please notify me!'));
. I've done the following to address the issue:typeof body === 'string'
to the if check to handle string primitivesUI
that contains tests for the param parsingmessage
type ofany
and the implementation attempts to handle it as best it can. This will allow for things likeUI.notify(5);
to succeed and be accepted by the type system.Fixes #74.