gnosisguild / zodiac-safe-app

https://gnosis-safe.io/app/share/safe-app?appUrl=https://zodiac.gnosisguild.org/&chainId=5
GNU Lesser General Public License v3.0
26 stars 28 forks source link

[Reality Module] `TypeError: window.location.ancestorOrigins is undefined` in dev environment for Firefox #142

Closed asgeir-s closed 2 years ago

asgeir-s commented 2 years ago

Getting this error in the dev environment (https://zodiac.dev.gnosisguild.org/), when loading it in a Safe and clicking on the "Reality Module" button in Firefox: TypeError: window.location.ancestorOrigins is undefined

Screenshot 2022-10-19 at 20 49 31

Related code: https://github.com/gnosis/zodiac-safe-app/blob/fb1b60918827f7794d344e5715350a28f4f3cd64/packages/app/src/utils/safeAppLink.ts#L5

asgeir-s commented 2 years ago

Apparently, Firefox does not support this: https://developer.mozilla.org/en-US/docs/Web/API/Location/ancestorOrigins#browser_compatibility

We need an alternative for when window.location.ancestorOrigins is undefined.