فهرست منبع

BugFix when state cache exists

Yuki Takei 6 سال پیش
والد
کامیت
37504c33a4
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      packages/growi-plugin-attachment-refs/src/client/js/components/AttachmentList.jsx

+ 9 - 0
packages/growi-plugin-attachment-refs/src/client/js/components/AttachmentList.jsx

@@ -42,10 +42,19 @@ export default class AttachmentList extends React.Component {
 
     // check cache exists
     if (stateCache != null) {
+      // restore state
       this.setState({
         ...stateCache,
         isLoading: false,
       });
+      // parse with no effect
+      try {
+        refsContext.parse();
+      }
+      catch (err) {
+        // do nothing
+      }
+
       return; // go to render()
     }