From 02c7325e4d0e3d25738acb94461e48e21116016f Mon Sep 17 00:00:00 2001 From: Mary Kate Date: Sat, 15 Aug 2020 16:24:34 -0500 Subject: [PATCH] Check src exists first in hover to play, hopefully fixes #322 --- app/soapbox/components/still_image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/components/still_image.js b/app/soapbox/components/still_image.js index ef02b13ef..18b3d9fb0 100644 --- a/app/soapbox/components/still_image.js +++ b/app/soapbox/components/still_image.js @@ -27,7 +27,7 @@ class StillImage extends React.PureComponent { hoverToPlay() { const { autoPlayGif, src } = this.props; - return !autoPlayGif && (src.endsWith('.gif') || src.startsWith('blob:')); + return src && !autoPlayGif && (src.endsWith('.gif') || src.startsWith('blob:')); } setCanvasRef = c => {