Skip to content

Commit

Permalink
fix(server-cache): must match exact alias
Browse files Browse the repository at this point in the history
there might a 3rd-party console registered that also
starts with 's', e.g. 'save'
  • Loading branch information
curbengh committed Jun 30, 2020
1 parent 0dad211 commit cfd281f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/hexo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ class Hexo extends EventEmitter {
const { cache } = Object.assign({
cache: false
}, this.config.server);
const { alias } = this.extend.console;

if (this.env.cmd.startsWith('s') && cache) {
if (alias[this.env.cmd] === 'server' && cache) {
// enable cache when run hexo server
useCache = true;
}
Expand Down

0 comments on commit cfd281f

Please sign in to comment.