Merge pull request #475 from sharetribe/address-can-be-undefined

Address can be undefined.
This commit is contained in:
Kimmo Puputti 2017-10-06 12:50:29 +03:00 committed by GitHub
commit 57077992f4

View file

@ -222,7 +222,7 @@ export const userAbbreviatedName = (user, bannedUserAbbreviatedName) => {
* TODO: address will be moved to custom field, when API supports custom fields.
*/
export const parseAddress = address => {
if (typeof address !== 'string') {
if (!(typeof address === 'string' || address == null)) {
throw new Error('Address must be a string.');
}