Преглед изворни кода

Merge branch 'apiv3-for-attachment.js-and-change-name-to-attachments.js' into add-pagination-in-endpoint-of-attachment

zahmis пре 5 година
родитељ
комит
fbc58f4716
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/client/js/components/PageAttachment.jsx

+ 2 - 2
src/client/js/components/PageAttachment.jsx

@@ -25,14 +25,14 @@ class PageAttachment extends React.Component {
     this.onAttachmentDeleteClickedConfirm = this.onAttachmentDeleteClickedConfirm.bind(this);
   }
 
-  componentDidMount() {
+  async componentDidMount() {
     const { pageId } = this.props.pageContainer.state;
 
     if (!pageId) {
       return;
     }
 
-    this.props.appContainer.apiv3Get('/attachments/list', { pageId })
+    await this.props.appContainer.apiv3Get('/attachments/list', { pageId })
       .then((res) => {
         const attachments = res.data.attachments;
         const inUse = {};