Skip to content

Commit

Permalink
Merge pull request #485 from jeffreypriebe/bugfix/fix-basename-match-…
Browse files Browse the repository at this point in the history
…warning

Fix logic bug when displaying history basename warning messages
  • Loading branch information
timdorr committed Jun 13, 2017
2 parents 4aeb669 + 93992e8 commit 2e50334
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/createBrowserHistory.js
Expand Up @@ -60,7 +60,7 @@ const createBrowserHistory = (props = {}) => {
let path = pathname + search + hash

warning(
!(basename && hasBasename(path, basename)),
(!basename || hasBasename(path, basename)),
'You are attempting to use a basename on a page whose URL path does not begin ' +
'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'
)
Expand Down
2 changes: 1 addition & 1 deletion modules/createHashHistory.js
Expand Up @@ -75,7 +75,7 @@ const createHashHistory = (props = {}) => {
let path = decodePath(getHashPath())

warning(
!(basename && hasBasename(path, basename)),
(!basename || hasBasename(path, basename)),
'You are attempting to use a basename on a page whose URL path does not begin ' +
'with the basename. Expected path "' + path + '" to begin with "' + basename + '".'
)
Expand Down

0 comments on commit 2e50334

Please sign in to comment.