1, not 2 names for 1 and the same abstraction
window.location calls it reload so util/helpers shouldn't call it redirect because UI/util/UIUtil has it is own redirect which is the assign of window.location.
This commit is contained in:
parent
8509efc8af
commit
a8cd4ff12c
|
@ -1,6 +1,6 @@
|
|||
const logger = require("jitsi-meet-logger").getLogger(__filename);
|
||||
|
||||
import { redirect } from '../util/helpers';
|
||||
import { replace } from '../util/helpers';
|
||||
|
||||
/**
|
||||
* The modules stores information about the URL used to start the conference and
|
||||
|
@ -68,6 +68,6 @@ export default class ConferenceUrl {
|
|||
*/
|
||||
reload() {
|
||||
logger.info("Reloading the conference using URL: " + this.originalURL);
|
||||
redirect(this.originalURL);
|
||||
replace(this.originalURL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,13 @@ export function reload () {
|
|||
}
|
||||
|
||||
/**
|
||||
* Redirects to new URL.
|
||||
* Redirects to a specific new URL by replacing the current location (in the
|
||||
* history).
|
||||
*
|
||||
* @param {string} url the URL pointing to the location where the user should
|
||||
* be redirected to.
|
||||
*/
|
||||
export function redirect (url) {
|
||||
export function replace(url) {
|
||||
window.location.replace(url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue