Skip to content

Commit

Permalink
fix empty image urls causing webchat to crash
Browse files Browse the repository at this point in the history
  • Loading branch information
pedily committed Nov 12, 2019
1 parent 53f2ca6 commit 887ed05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/messenger/MessengerPreview/lib/css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export const getBackgroundImage = (url: string) => {
if (!url)
return undefined;

const escapedUrl = url
// remove line breaks
.replace(/\n/g, '')
Expand Down

0 comments on commit 887ed05

Please sign in to comment.