Handle acme.cal.local root path (#20981)
This commit is contained in:
1 parent
6f4e51b859
commit
6ebf0db389
2 files changed
+10
No files matched your search
@@ -195,6 +195,11 @@ describe("getUniqueIdentifierForBookingPage", () => {
|
||||
const result = getUniqueIdentifierForBookingPage({ pathname: path });
|
||||
expect(result).toBe(expected);
|
||||
});
|
||||
|
||||
it("should return / for root path", () => {
|
||||
const result = getUniqueIdentifierForBookingPage({ pathname: "/" });
|
||||
expect(result).toBe("/");
|
||||
});
|
||||
});
|
||||
|
||||
describe("Team Pages", () => {
|
||||
|
||||
@@ -16,6 +16,11 @@ const enum ThemeSupport {
|
||||
* The theme stays same for same identifier.
|
||||
*/
|
||||
export function getUniqueIdentifierForBookingPage({ pathname }: { pathname: string }) {
|
||||
if (pathname === "/") {
|
||||
// For Org domains, we could have a booking page at root path too, so we use '/' as identifier
|
||||
// As localStorage isn't shared for different org domains, it's safe to use '/' as identifier
|
||||
return "/";
|
||||
}
|
||||
const pathTokens = pathname.split("/").slice(1);
|
||||
|
||||
// If it is a booking page then it could be one of the following:
|
||||
|
||||
Reference in new issue
Block a user