mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
6 lines
295 B
TypeScript
6 lines
295 B
TypeScript
export const navigateInTopWindow = (url: string) => {
|
|
// In some weird unknown case, window.top.location could be null as per typescript. In such case, we still do the redirect but in same window
|
|
const location = window.top ? window.top.location : window.location;
|
|
location.href = url;
|
|
};
|