Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Made optional arguments for browser router optional in flow type.
Browse files Browse the repository at this point in the history
  • Loading branch information
gertsonderby authored and tptee committed Apr 4, 2018
1 parent 3badee9 commit 0adead1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/environment/browser-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import install from '../install';

type BrowserRouterArgs = {
routes: Object,
basename: string,
historyOptions: BrowserHistoryOptions,
history: History
basename?: string,
historyOptions?: BrowserHistoryOptions,
history?: History
};

export const createBrowserRouter = (installer: Function) => ({
Expand All @@ -28,7 +28,7 @@ export const createBrowserRouter = (installer: Function) => ({

// Strip the basename from the initial pathname
const pathname =
fullPathname.indexOf(basename) === 0
basename && fullPathname.indexOf(basename) === 0
? fullPathname.slice(basename.length)
: fullPathname;

Expand Down

0 comments on commit 0adead1

Please sign in to comment.