You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2022/07/30 15:54:08 UTC

[echarts-examples] branch gh-pages updated: fix(helper): ensure prettier plugin is loaded before formatting code

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 05dc444b fix(helper): ensure prettier plugin is loaded before formatting code
05dc444b is described below

commit 05dc444ba0158abc03f769573ebad06da03f9b2d
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sat Jul 30 23:52:50 2022 +0800

    fix(helper): ensure prettier plugin is loaded before formatting code
---
 src/common/helper.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/common/helper.js b/src/common/helper.js
index e9012a47..80abbf3c 100644
--- a/src/common/helper.js
+++ b/src/common/helper.js
@@ -63,7 +63,10 @@ export function downloadBlob(blob, fileName) {
 }
 
 function ensurePrettier() {
-  if (typeof prettier === 'undefined') {
+  if (
+    typeof prettier === 'undefined' ||
+    typeof prettierPlugins === 'undefined'
+  ) {
     return loadScriptsAsync([
       SCRIPT_URLS.prettierDir + '/standalone.js',
       SCRIPT_URLS.prettierDir +


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org