Skip to content

Commit

Permalink
Fix logic bug when displaying history basename warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreypriebe committed Jun 6, 2017
1 parent 632dd9b commit 93992e8
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 93992e8

Please sign in to comment.