1
0
Эх сурвалжийг харах

wait for plotly to be loaded (fixes #3784)

Falko Schindler 8 сар өмнө
parent
commit
9598efd8ae

+ 6 - 0
nicegui/elements/plotly.vue

@@ -13,6 +13,12 @@ export default {
   },
   methods: {
     update() {
+      // wait for plotly to be loaded
+      if (typeof Plotly === "undefined") {
+        setTimeout(this.update, 10);
+        return;
+      }
+
       // default responsive to true
       const options = this.options;
       if (options.config === undefined) options.config = { responsive: true };