itizawa 5 лет назад
Родитель
Сommit
70f3a77371
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      src/client/js/components/Page/TagLabels.jsx

+ 5 - 3
src/client/js/components/Page/TagLabels.jsx

@@ -1,4 +1,4 @@
-import React, { Suspense } from 'react';
+import React from 'react';
 import PropTypes from 'prop-types';
 import { withTranslation } from 'react-i18next';
 
@@ -11,8 +11,6 @@ import EditorContainer from '../../services/EditorContainer';
 
 import TagEditModal from './TagEditModal';
 
-const tags = null;
-
 class TagLabels extends React.Component {
 
   constructor(props) {
@@ -28,6 +26,10 @@ class TagLabels extends React.Component {
     this.renderTagLabels = this.renderTagLabels.bind(this);
   }
 
+  shouldComponentUpdate() {
+    return this.getEditTargetData() != null;
+  }
+
   /**
    * @return tags data
    *   1. pageContainer.state.tags if isEditorMode is false