hexo-swpp 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -197,7 +197,7 @@ const buildUpdateJson = (name, dif, oldUpdate) => {
|
|
|
197
197
|
// 读取拓展 json
|
|
198
198
|
const expand = fs.existsSync(name) ? JSON.parse(fs.readFileSync(name, 'utf-8')) : undefined
|
|
199
199
|
// 获取上次最新的版本
|
|
200
|
-
let oldVersion = oldUpdate?.info
|
|
200
|
+
let oldVersion = oldUpdate?.info?.at(0)?.version ?? 0
|
|
201
201
|
if (typeof oldVersion !== 'number') {
|
|
202
202
|
// 当上次最新的版本号不是数字是尝试对其进行转换,如果无法转换则直接置零
|
|
203
203
|
if (oldVersion.match('\D')) oldVersion = 0
|