about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-04-05 04:57:36 -0400
committerGitHub <noreply@github.com>2023-04-05 10:57:36 +0200
commit927b2fd1386bce6fda1d2ff53ceadd82289d77ce (patch)
tree4685e71d484f9a9bbce4fc9d1c1b90dafffceb81
parentab3f23da916c8578148fe92fe008da19b8a7ed02 (diff)
Set marginRight as string (#24422)
-rw-r--r--app/javascript/mastodon/containers/media_container.jsx2
-rw-r--r--app/javascript/mastodon/features/ui/components/modal_root.jsx2
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 25dc17444..f9244f8dd 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 5a1734977..c252e6caa 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';
     }
   }