This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 93e35a19 fix(editor): fix PR hint may show repeatly
93e35a19 is described below

commit 93e35a196b53c9ee64bce2fc46df6cf859a31a5b
Author: Zhongxiang Wang <[email protected]>
AuthorDate: Fri Jul 7 10:27:34 2023 +0800

    fix(editor): fix PR hint may show repeatly
---
 src/editor/Preview.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/editor/Preview.vue b/src/editor/Preview.vue
index 3b3873f1..66cbe5f5 100644
--- a/src/editor/Preview.vue
+++ b/src/editor/Preview.vue
@@ -398,7 +398,11 @@ export default {
           store.isSharedCode && this.showShareHint();
           // show PR hint on first run if it's based on PR
           store.isPR &&
-            setTimeout(this.showPRHint, store.isSharedCode ? 1e3 : 0);
+            !this.prHintTimer &&
+            (this.prHintTimer = setTimeout(
+              this.showPRHint,
+              store.isSharedCode ? 1e3 : 0
+            ));
         } else {
           this.debouncedRun();
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to