Fix the small mechanical rules. [skip build]
This commit is contained in:
@@ -182,15 +182,9 @@ function getCurrentRoomId(): string | null {
|
||||
try {
|
||||
// Get the pathname from URL
|
||||
// Support both normal routing and hash routing
|
||||
let { pathname } = window.location;
|
||||
|
||||
// If using hash router, parse from hash
|
||||
if (window.location.hash) {
|
||||
const hashMatch = window.location.hash.match(/#(.+)/);
|
||||
if (hashMatch) {
|
||||
pathname = hashMatch[1];
|
||||
}
|
||||
}
|
||||
const hashMatch = window.location.hash.match(/#(.+)/);
|
||||
const [, hashPath] = hashMatch ?? [];
|
||||
const pathname = hashPath ?? window.location.pathname;
|
||||
|
||||
// URL patterns:
|
||||
// /home/:roomIdOrAlias/:eventId?/
|
||||
|
||||
Reference in New Issue
Block a user