From f4f7ce66fc0489e3e8960e48697a0f62b7f90eab Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Mon, 6 May 2024 19:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=B8=AA=E7=BB=95?= =?UTF-8?q?=E5=9C=88=E5=AD=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/init/polyfill.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/noname/init/polyfill.js b/noname/init/polyfill.js index 1c685b50b..51fc9a8ce 100644 --- a/noname/init/polyfill.js +++ b/noname/init/polyfill.js @@ -142,17 +142,14 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", { gzbool = false; const mode = get.mode(); if (type == "character") { + nameinfo = get.character(name); if (lib.characterPack[`mode_${mode}`] && lib.characterPack[`mode_${mode}`][name]) { if (mode == "guozhan") { - nameinfo = lib.character[name]; if (name.startsWith("gz_shibing")) name = name.slice(3, 11); else { - if ( - lib.config.mode_config.guozhan.guozhanSkin && - lib.character[name] && - lib.character[name].hasSkinInGuozhan - ) + if (lib.config.mode_config.guozhan.guozhanSkin && nameinfo && nameinfo.hasSkinInGuozhan){ gzbool = true; + } name = name.slice(3); } } else modeimage = mode; @@ -161,8 +158,6 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", { name = name.split("::"); modeimage = name[0]; name = name[1]; - } else { - nameinfo = get.character(name); } } let imgPrefixUrl;