From b36ce75aad9c17d1aacc951608485c5bd64214a6 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 20 Nov 2023 16:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DConfig=E5=9C=A8=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E6=96=87=E4=BB=B6=E4=B8=AD=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/config.js b/lib/config.js index e2630825..46575239 100644 --- a/lib/config.js +++ b/lib/config.js @@ -63,6 +63,9 @@ export const siteConfig = (key, defaultVal = null, extendConfig = null) => { return defaultVal } else { if (typeof val === 'string') { + if (val === 'true' || val === 'false') { + return JSON.parse(val); + } return val; } else { try {