Skip to content

Commit

Permalink
Reverse createHref and createPath warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Dec 14, 2015
1 parent e73011a commit 38158d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
> Unreleased
- **Bugfix:** Don't throw in memory history when out of history entries ([#170])
- **Bugfix:** Fix the deprecation warnings on `createPath` and `createHref` ([#189])

[HEAD]: https://github.com/rackt/history/compare/latest...HEAD
[#170]: https://github.com/rackt/history/pull/170
[#189]: https://github.com/rackt/history/pull/189

## [v1.16.0]

Expand Down
4 changes: 2 additions & 2 deletions modules/useQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ function useQueries(createHistory) {

function createPath(location, query) {
warning(
query,
!query,
'the query argument to createPath is deprecated; use a location descriptor instead'
)
return history.createPath(appendQuery(location, query || location.query))
}

function createHref(location, query) {
warning(
query,
!query,
'the query argument to createHref is deprecated; use a location descriptor instead'
)
return history.createHref(appendQuery(location, query || location.query))
Expand Down

0 comments on commit 38158d8

Please sign in to comment.