From 7b449137244496cfb17036817293b72b81741d89 Mon Sep 17 00:00:00 2001 From: or-else Date: Sun, 5 Feb 2023 13:46:08 -0800 Subject: [PATCH] fix display of broken videos --- src/lib/formatters.js | 2 -- src/widgets/inline-video.jsx | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/formatters.js b/src/lib/formatters.js index a2d7bfe4..1b13322b 100644 --- a/src/lib/formatters.js +++ b/src/lib/formatters.js @@ -236,8 +236,6 @@ function handleVideoData(el, data, attr) { if (data.ref || data.val) { attr.onClick = this.onVideoPreview; attr.loading = 'lazy'; - } else { - attr.src = null; } el = InlineVideo; } else { diff --git a/src/widgets/inline-video.jsx b/src/widgets/inline-video.jsx index a61dfa63..08919b28 100644 --- a/src/widgets/inline-video.jsx +++ b/src/widgets/inline-video.jsx @@ -27,11 +27,12 @@ export default class InlineVideo extends React.PureComponent { return (
{React.createElement('img', this.props)} +
{this.props.onClick ? -
- play_arrow -
- : null} + play_arrow + : + } +
{duration ?
{duration}
: null}
);