From f003b7d9d88688e9504f7dfae1545d7522fcfd98 Mon Sep 17 00:00:00 2001 From: Hidenori Sekine Date: Wed, 10 Feb 2021 07:29:42 +0000 Subject: [PATCH] Fixed picture in picture compatibility error in WebUI when status is deleted --- .../features/picture_in_picture/components/footer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.js b/app/javascript/mastodon/features/picture_in_picture/components/footer.js index 1b1ec6d543..4b3ed549fe 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.js +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.js @@ -121,6 +121,13 @@ class Footer extends ImmutablePureComponent { render () { const { status, intl, withOpenButton } = this.props; + if (status == null) { + return ( +
+
+ ); + } + const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); const reblogPrivate = status.getIn(['account', 'id']) === me && status.get('visibility') === 'private';