Deprecate window.location wrappers for redirect and reload

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2019-06-03 15:59:31 +02:00 committed by Roeland Jago Douma
parent 0f0dfc837e
commit ac0e414a18
No known key found for this signature in database
GPG key ID: F941078878347C0C
4 changed files with 2 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -22,10 +22,12 @@
/**
* Redirect to the target URL, can also be used for downloads.
* @param {string} targetURL URL to redirect to
* @deprecated 17.0.0 use window.location directly
*/
export const redirect = targetURL => window.location = targetURL
/**
* Reloads the current page
* @deprecated 17.0.0 use window.location.reload directly
*/
export const reload = () => window.location.reload()