Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure creatorsToString() always returns a string
The current implementation will return undefined if the creators array is empty. This causes other functions which expect a string (which is what TypeScript assumes) to fail. Add a return type to the function to assert the intention of the function. We could also have allowed it to return undefined if the creators array is empty but that seems to be against the naming of the function, creatorsToString. Add a check to handle single array and empty creators array separately. If there are no creators then return an empty string.
- Loading branch information