Skip to content

Commit

Permalink
Remove support for <base href> as basename
Browse files Browse the repository at this point in the history
Fixes #94
  • Loading branch information
mjackson committed Apr 19, 2016
1 parent 3d1eb2f commit 0cacf47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
16 changes: 9 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## [HEAD]

- Added `locationsAreEqual` to top-level exports
- **Breakage:** Removed support for `<base href>` as `basename` ([#94])
- Removed dependency on `deep-equal`

[HEAD]: https://github.com/mjackson/history/compare/latest...HEAD
[#94]: https://github.com/mjackson/history/issues/94

## [3.0.0-0]
> Mar 19, 2016
- **Feature:** Added `history.getCurrentLocation()` method
- Added `history.getCurrentLocation()` method
- **Breakage:** `history.listen` no longer calls the callback synchronously once.
Use `history.getCurrentLocation` instead
- **Breakage:** `location.key` on the initial POP is `null`. Users who relied on
Expand Down Expand Up @@ -77,26 +79,26 @@
> Dec 10, 2015
- **Bugfix:** Silence all warnings that were introduced since 1.13 (see [reactjs/react-router#2682])
- **Deprecation:** Deprecate the `createLocation` method in the top-level exports
- **Deprecation:** Deprecate the `state` arg to `history.createLocation`
- Deprecate the `createLocation` method in the top-level exports
- Deprecate the `state` arg to `history.createLocation`

[v1.16.0]: https://github.com/mjackson/history/compare/v1.15.0...v1.16.0
[reactjs/react-router#2682]: https://github.com/reactjs/react-router/issues/2682

## [v1.15.0]
> Dec 7, 2015
- **Feature:** Accept location descriptors in `createPath` and `createHref` ([#173])
- **Deprecation:** Deprecate the `query` arg to `createPath` and `createHref` in favor of using location descriptor objects ([#173])
- Accept location descriptors in `createPath` and `createHref` ([#173])
- Deprecate the `query` arg to `createPath` and `createHref` in favor of using location descriptor objects ([#173])

[v1.15.0]: https://github.com/mjackson/history/compare/v1.14.0...v1.15.0
[#173]: https://github.com/mjackson/history/pull/173

## [v1.14.0]
> Dec 6, 2015
- **Feature:** Accept objects in `history.push` and `history.replace` ([#141])
- **Deprecation:** Deprecate `history.pushState` and `history.replaceState` in favor of passing objects to `history.push` and `history.replace` ([#168])
- Accept objects in `history.push` and `history.replace` ([#141])
- Deprecate `history.pushState` and `history.replaceState` in favor of passing objects to `history.push` and `history.replace` ([#168])
- **Bugfix:** Disable browser history on Chrome iOS ([#146])
- **Bugfix:** Do not convert same-path PUSH to REPLACE if the hash has changed ([#167])
- Add ES2015 module build ([#152])
Expand Down
10 changes: 0 additions & 10 deletions modules/useBasename.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { canUseDOM } from './ExecutionEnvironment'
import runTransitionHook from './runTransitionHook'
import { parsePath } from './PathUtils'

Expand All @@ -7,15 +6,6 @@ const useBasename = (createHistory) =>
const history = createHistory(options)
let { basename } = options

// Automatically use the value of <base href> in HTML
// documents as basename if it's not explicitly given.
if (basename == null && canUseDOM) {
const base = document.getElementsByTagName('base')[0]

if (base)
basename = base.getAttribute('href')
}

const addBasename = (location) => {
if (!location)
return location
Expand Down

0 comments on commit 0cacf47

Please sign in to comment.