From c67065b011498048981739f630b46d1707deac81 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 26 Jun 2021 23:37:30 +0800 Subject: [PATCH] fix bug --- layout/_partial/scripts/index.ejs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/layout/_partial/scripts/index.ejs b/layout/_partial/scripts/index.ejs index adc4416..9f8646a 100644 --- a/layout/_partial/scripts/index.ejs +++ b/layout/_partial/scripts/index.ejs @@ -61,13 +61,8 @@ // 从 butterfly 和 volantis 获得灵感 loadScript: (src, opt) => new Promise((resolve, reject) => { - // 判断是否存在 - let el = document.querySelector("script[src='" + src + "']") - if (el !== null) { - return - } - var script = document.createElement('script') - script.src = src + var script = document.createElement('script'); + script.src = src; if (opt) { for (let key of Object.keys(opt)) { script[key] = opt[key]