Yuki Takei 3 yıl önce
ebeveyn
işleme
6bc35b647e

+ 1 - 1
packages/remark-drawio-plugin/src/components/DrawioViewer.tsx

@@ -42,7 +42,7 @@ export const DrawioViewer = React.memo((props: DrawioViewerProps): JSX.Element =
       return;
       return;
     }
     }
 
 
-    if (GraphViewer == null || !isGraphViewerGlobal(GraphViewer)) {
+    if (!('GraphViewer' in window && isGraphViewerGlobal(GraphViewer))) {
       // Do nothing if loading has not been terminated.
       // Do nothing if loading has not been terminated.
       // Alternatively, GraphViewer.processElements() will be called in Script.onLoad.
       // Alternatively, GraphViewer.processElements() will be called in Script.onLoad.
       // see DrawioViewerScript.tsx
       // see DrawioViewerScript.tsx