Skip to content

Commit

Permalink
fix: use hooks.now if available
Browse files Browse the repository at this point in the history
  • Loading branch information
lrowe committed Apr 12, 2018
1 parent 26245b0 commit 3ff0df4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Router.prototype = {
this._pathErrorHook = (opts.hooks && opts.hooks.pathError) || noOp;
this._errorHook = opts.hooks && opts.hooks.error;
this._methodSummaryHook = opts.hooks && opts.hooks.methodSummary;
this._now = opts.now || defaultNow;
this._now = (opts.hooks && opts.hooks.now) || opts.now || defaultNow;
this.maxRefFollow = opts.maxRefFollow || MAX_REF_FOLLOW;
this.maxPaths = opts.maxPaths || MAX_PATHS;
}
Expand Down

0 comments on commit 3ff0df4

Please sign in to comment.