handle undefined

This commit is contained in:
Daniel Lugo 2020-07-17 18:39:50 -04:00
parent ae4dbe1940
commit 84e439316b

View file

@ -49,14 +49,14 @@ const getAnUser = async publicKey => {
/** @type {Common.SchemaTypes.User} */
const u = {
avatar: oldProfile.avatar,
avatar: oldProfile.avatar || null,
// @ts-ignore
bio,
displayName: oldProfile.displayName,
bio: bio || null,
displayName: oldProfile.displayName || null,
// @ts-ignore
lastSeenApp,
lastSeenApp: lastSeenApp || 0,
// @ts-ignore
lastSeenNode,
lastSeenNode: lastSeenNode || 0,
// @ts-ignore
publicKey
}