You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Rename mysterious _ to beforeFirstSlash
This commit is contained in:
@@ -100,7 +100,7 @@ export async function getRedactedCurrentLocation(origin: string, hash: string, p
|
|||||||
if (hash == "") {
|
if (hash == "") {
|
||||||
hashStr = "";
|
hashStr = "";
|
||||||
} else {
|
} else {
|
||||||
let [_, screen, ...parts] = hash.split("/");
|
let [beforeFirstSlash, screen, ...parts] = hash.split("/");
|
||||||
|
|
||||||
if (!whitelistedScreens.has(screen)) {
|
if (!whitelistedScreens.has(screen)) {
|
||||||
screen = "<redacted_screen_name>";
|
screen = "<redacted_screen_name>";
|
||||||
@@ -110,7 +110,7 @@ export async function getRedactedCurrentLocation(origin: string, hash: string, p
|
|||||||
parts[i] = anonymity === Anonymity.Anonymous ? `<redacted>` : await hashHex(parts[i]);
|
parts[i] = anonymity === Anonymity.Anonymous ? `<redacted>` : await hashHex(parts[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hashStr = `${_}/${screen}/${parts.join("/")}`;
|
hashStr = `${beforeFirstSlash}/${screen}/${parts.join("/")}`;
|
||||||
}
|
}
|
||||||
return origin + pathname + hashStr;
|
return origin + pathname + hashStr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user