Skip to content

Commit

Permalink
feat(router): fix options for browser navigator
Browse files Browse the repository at this point in the history
  • Loading branch information
jwx committed Aug 25, 2019
1 parent 189377d commit dbf5449
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/router/src/browser-navigator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Key, Reporter } from '@aurelia/kernel';
import { IDOM, ILifecycle } from '@aurelia/runtime';
import { HTMLDOM } from '@aurelia/runtime-html';
import { INavigatorState, INavigatorStore, INavigatorViewer, INavigatorViewerEvent, INavigatorViewerOptions } from './navigator';
import { INavigatorState, INavigatorStore, INavigatorViewer, INavigatorViewerOptions } from './navigator';
import { Queue, QueueItem } from './queue';

interface Call {
Expand Down Expand Up @@ -54,7 +54,10 @@ export class BrowserNavigator implements INavigatorStore, INavigatorViewer {
throw new Error('Browser navigation has already been activated');
}
this.isActive = true;
this.options = { ...this.options, ...options };
this.options.callback = options.callback;
if (options.useBrowserFragmentHash != void 0) {
this.options.useBrowserFragmentHash = options.useBrowserFragmentHash;
}
this.pendingCalls.activate({ lifecycle: this.lifecycle, allowedExecutionCostWithinTick: this.allowedExecutionCostWithinTick });
this.window.addEventListener('popstate', this.handlePopstate);
}
Expand Down

0 comments on commit dbf5449

Please sign in to comment.