浏览代码

upd: theme sass cdn request

richard1015 3 年之前
父节点
当前提交
3ab1cbd71f
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      src/sites/assets/util/helper.ts

+ 3 - 5
src/sites/assets/util/helper.ts

@@ -175,11 +175,9 @@ export const useThemeEditor = function () {
       } as any;
       const customUrl = param && source[param.replace('/', '')];
       if (customUrl) {
-        Promise.all([
-          getSassVariables(customUrl),
-          loadScript('https://cdnout.com/sass.js/sass.sync.min.js'),
-          getRawSassStyle()
-        ]);
+        loadScript('https://cdnout.com/sass.js/sass.sync.min.js').then((res) => {
+          Promise.all([getSassVariables(customUrl), getRawSassStyle()]);
+        });
         store.init = true;
       }
     }