-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checking for @type
being an array
#599
Conversation
✅ Deploy Preview for thingweb-playground ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Gotten a bit rusty and made some mistakes... Will refactor :) |
return "td"; | ||
} | ||
} else { | ||
// then it is an array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to check for array?
/** | ||
* Checks if the input is a TD or TM | ||
* @param {jsonDocument} | ||
* @returns "tm" or "td" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to report a unknown value also so the caller can decide what it is defaulting to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments
fixes #598