From 35e5fc003cff64098f8c5e9d32a4ff2d145f1a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=96=87=E8=B1=AA?= <980287353@qq.com> Date: Tue, 14 Nov 2023 14:33:55 +0800 Subject: [PATCH] chore:1.0.15 --- package.json | 2 +- src/utils/Common.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e7f2343..f1d729e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tiesheng/npm-tool", - "version": "1.0.14", + "version": "1.0.15", "description": "npm tool package", "main": "index.js", "scripts": { diff --git a/src/utils/Common.js b/src/utils/Common.js index d62bdef..352ee20 100644 --- a/src/utils/Common.js +++ b/src/utils/Common.js @@ -37,6 +37,9 @@ const parseJSON = (value, def = {}) => { obj = JSON.parse(value); } catch (e) { } + if (!obj) { + obj = def; + } return obj; };