diff --git a/index.js b/index.js index 27767a5..a2a856b 100644 --- a/index.js +++ b/index.js @@ -55,7 +55,7 @@ hexo.extend.console.register('bangumi', 'Generate pages of bilibili bangumis for log.info('Bangumis data has been deleted'); } } else if (args.u) { - var _this$config2; + var _this$config2, _this$config$bangumi$; if (!(this === null || this === void 0 ? void 0 : (_this$config2 = this.config) === null || _this$config2 === void 0 ? void 0 : _this$config2.bangumi)) { log.info('Please add config to _config.yml'); @@ -71,7 +71,7 @@ hexo.extend.console.register('bangumi', 'Generate pages of bilibili bangumis for return; } - saveBangumiData(this.config.bangumi.vmid, this.config.bangumi.webp, this.config.bangumi.progress); + saveBangumiData(this.config.bangumi.vmid, this.config.bangumi.webp, (_this$config$bangumi$ = this.config.bangumi.progress) !== null && _this$config$bangumi$ !== void 0 ? _this$config$bangumi$ : true); } else { log.info('Unknown command, please use "hexo bangumi -h" to see the available commands'); } diff --git a/package.json b/package.json index 539c66b..01c6aba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-bilibili-bangumi", - "version": "1.4.0", + "version": "1.4.1", "description": "hexo bilibili番剧页", "main": "index.js", "scripts": { diff --git a/src/index.js b/src/index.js index 32fe750..d71760b 100644 --- a/src/index.js +++ b/src/index.js @@ -41,7 +41,7 @@ hexo.extend.console.register('bangumi', 'Generate pages of bilibili bangumis for log.info('Please add vmid to _config.yml') return } - saveBangumiData(this.config.bangumi.vmid, this.config.bangumi.webp, this.config.bangumi.progress) + saveBangumiData(this.config.bangumi.vmid, this.config.bangumi.webp, this.config.bangumi.progress ?? true) } else { log.info('Unknown command, please use "hexo bangumi -h" to see the available commands') }