Files
twenty/packages/twenty-front/src/utils/isInIframe.ts
Aditya Pimpalkar a12c1aad5e fix: user has to login every time chrome sidepanel is opened (#5544)
We can pass the auth tokens to our front app via post message, which
will also allow us to pass route names to navigate on it
2024-05-30 12:58:45 +02:00

8 lines
120 B
TypeScript

export const isInFrame = () => {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
};