Skip to content

Commit

Permalink
style: assign to this.variable
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Dec 18, 2019
1 parent 85b6054 commit 3808441
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/extend/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Console.prototype.register = function(name, desc, options, fn) {
fn = Promise.method(fn);
}

this.store[name.toLowerCase()] = fn;
const c = fn;

const c = this.store[name.toLowerCase()];
this.store[name.toLowerCase()] = c;
c.options = options;
c.desc = desc;

Expand Down
4 changes: 2 additions & 2 deletions lib/extend/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class Filter {
type = typeAlias[type] || type;
priority = priority == null ? 10 : priority;

this.store[type] = this.store[type] || [];
const store = this.store[type];
const store = this.store[type] || [];
this.store[type] = store;

fn.priority = priority;
store.push(fn);
Expand Down

0 comments on commit 3808441

Please sign in to comment.