Skip to content

Commit

Permalink
fix: npe
Browse files Browse the repository at this point in the history
  • Loading branch information
gxkl committed Jan 9, 2025
1 parent 2e7afed commit e8a5d59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/egg.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,12 @@ class EggApplication extends EggCore {
ignoreList = [];
}

const ignoreKeyPaths = this.config.dump.ignoreKeyPaths;
let ignoreKeyPaths;
try {
ignoreKeyPaths = this.config.dump.ignoreKeyPaths;
} catch (e) {
ignoreKeyPaths = {};
}

const json = extend(true, {}, { config: this.config, plugins: this.loader.allPlugins, appInfo: this.loader.appInfo });
utils.convertObject(json, ignoreList, ignoreKeyPaths ? Object.keys(ignoreKeyPaths) : []);
Expand Down

0 comments on commit e8a5d59

Please sign in to comment.