Skip to content

Commit

Permalink
Fix opts passed into start()
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpblog committed Nov 9, 2018
1 parent 14a9fbd commit bb44f10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions index.js
Expand Up @@ -145,9 +145,10 @@
*/

Page.prototype.start = function(options) {
this.configure(options);
var opts = options || {};
this.configure(opts);

if (false === options.dispatch) return;
if (false === opts.dispatch) return;
this._running = true;

var url;
Expand All @@ -164,7 +165,7 @@
}
}

this.replace(url, null, true, options.dispatch);
this.replace(url, null, true, opts.dispatch);
};

/**
Expand Down
7 changes: 4 additions & 3 deletions page.mjs
Expand Up @@ -539,9 +539,10 @@ pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
*/

Page.prototype.start = function(options) {
this.configure(options);
var opts = options || {};
this.configure(opts);

if (false === options.dispatch) return;
if (false === opts.dispatch) return;
this._running = true;

var url;
Expand All @@ -558,7 +559,7 @@ pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
}
}

this.replace(url, null, true, options.dispatch);
this.replace(url, null, true, opts.dispatch);
};

/**
Expand Down

0 comments on commit bb44f10

Please sign in to comment.