Browse Source

chore: Better way of getting the body node

Johannes Schill 7 years ago
parent
commit
6bd87098cf
1 changed files with 1 additions and 2 deletions
  1. 1 2
      public/app/core/components/Page/Page.tsx

+ 1 - 2
public/app/core/components/Page/Page.tsx

@@ -8,7 +8,6 @@ import Footer from '../Footer/Footer';
 import PageContents from './PageContents';
 import PageContents from './PageContents';
 import { CustomScrollbar } from '@grafana/ui';
 import { CustomScrollbar } from '@grafana/ui';
 
 
-
 interface Props {
 interface Props {
   title?: string;
   title?: string;
   children: JSX.Element[] | JSX.Element;
   children: JSX.Element[] | JSX.Element;
@@ -16,7 +15,7 @@ interface Props {
 
 
 class Page extends Component<Props> {
 class Page extends Component<Props> {
   private bodyClass = 'is-react';
   private bodyClass = 'is-react';
-  private body = document.getElementsByTagName('body')[0];
+  private body = document.body;
   static Header = PageHeader;
   static Header = PageHeader;
   static Contents = PageContents;
   static Contents = PageContents;