[FIX] Crash while displaying the attached image with http on file name (#1401)

This commit is contained in:
Guilherme Siqueira 2019-12-17 11:11:24 -03:00 committed by Diego Mello
parent 1c89501938
commit f1fcdf7379
1 changed files with 1 additions and 1 deletions

View File

@ -1,3 +1,3 @@
export const formatAttachmentUrl = (attachmentUrl, userId, token, server) => ( export const formatAttachmentUrl = (attachmentUrl, userId, token, server) => (
encodeURI(attachmentUrl.includes('http') ? attachmentUrl : `${ server }${ attachmentUrl }?rc_uid=${ userId }&rc_token=${ token }`) encodeURI(attachmentUrl.startsWith('http') ? attachmentUrl : `${ server }${ attachmentUrl }?rc_uid=${ userId }&rc_token=${ token }`)
); );