commit | 05dc444ba0158abc03f769573ebad06da03f9b2d | [log] [tgz] |
---|---|---|
author | plainheart <yhen@all-my-life.cn> | Sat Jul 30 23:52:50 2022 +0800 |
committer | plainheart <yhen@all-my-life.cn> | Sat Jul 30 23:53:48 2022 +0800 |
tree | 6811e0d72c39b9528276ff20e74c970cbc31cf4e | |
parent | 2f1c12618f16992c7aefc912054acea190560c15 [diff] |
fix(helper): ensure prettier plugin is loaded before formatting code
diff --git a/src/common/helper.js b/src/common/helper.js index e9012a4..80abbf3 100644 --- a/src/common/helper.js +++ b/src/common/helper.js
@@ -63,7 +63,10 @@ } function ensurePrettier() { - if (typeof prettier === 'undefined') { + if ( + typeof prettier === 'undefined' || + typeof prettierPlugins === 'undefined' + ) { return loadScriptsAsync([ SCRIPT_URLS.prettierDir + '/standalone.js', SCRIPT_URLS.prettierDir +