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.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. 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[0]?.version ?? 0
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-swpp",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.2.0",