Merge pull request #15859 from nextcloud/deprecate/oc-redirect-reload

Deprecate window.location wrappers for redirect and reload
This commit is contained in:
Roeland Jago Douma 2019-06-26 10:00:31 +02:00 committed by GitHub
commit bc276cdd83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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()