mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-13 14:45:12 +01:00
Fix WebUI crash when a toot with a playing video gets deleted
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
776e00f193
commit
036ec18fb3
@ -22,13 +22,20 @@ export const PICTURE_IN_PICTURE_REMOVE = 'PICTURE_IN_PICTURE_REMOVE';
|
|||||||
* @param {MediaProps} props
|
* @param {MediaProps} props
|
||||||
* @return {object}
|
* @return {object}
|
||||||
*/
|
*/
|
||||||
export const deployPictureInPicture = (statusId, accountId, playerType, props) => ({
|
export const deployPictureInPicture = (statusId, accountId, playerType, props) => {
|
||||||
type: PICTURE_IN_PICTURE_DEPLOY,
|
return (dispatch, getState) => {
|
||||||
statusId,
|
// Do not open a player for a toot that does not exist
|
||||||
accountId,
|
if (getState().hasIn(['statuses', statusId])) {
|
||||||
playerType,
|
dispatch({
|
||||||
props,
|
type: PICTURE_IN_PICTURE_DEPLOY,
|
||||||
});
|
statusId,
|
||||||
|
accountId,
|
||||||
|
playerType,
|
||||||
|
props,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @return {object}
|
* @return {object}
|
||||||
|
Loading…
Reference in New Issue
Block a user