From 927b2fd1386bce6fda1d2ff53ceadd82289d77ce Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 5 Apr 2023 04:57:36 -0400 Subject: [PATCH] Set marginRight as string (#24422) --- app/javascript/mastodon/containers/media_container.jsx | 2 +- app/javascript/mastodon/features/ui/components/modal_root.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/containers/media_container.jsx b/app/javascript/mastodon/containers/media_container.jsx index 25dc1744449..f9244f8dd39 100644 --- a/app/javascript/mastodon/containers/media_container.jsx +++ b/app/javascript/mastodon/containers/media_container.jsx @@ -54,7 +54,7 @@ export default class MediaContainer extends PureComponent { handleCloseMedia = () => { document.body.classList.remove('with-modals--active'); - document.documentElement.style.marginRight = 0; + document.documentElement.style.marginRight = '0'; this.setState({ media: null, diff --git a/app/javascript/mastodon/features/ui/components/modal_root.jsx b/app/javascript/mastodon/features/ui/components/modal_root.jsx index 5a17349771b..c252e6caac3 100644 --- a/app/javascript/mastodon/features/ui/components/modal_root.jsx +++ b/app/javascript/mastodon/features/ui/components/modal_root.jsx @@ -73,7 +73,7 @@ export default class ModalRoot extends React.PureComponent { document.documentElement.style.marginRight = `${getScrollbarWidth()}px`; } else { document.body.classList.remove('with-modals--active'); - document.documentElement.style.marginRight = 0; + document.documentElement.style.marginRight = '0'; } }