This would normally not break anything in a normal Javascript environment. However, if using Deno and compiling to an executable, it breaks as Deno executables can't access localStorage.
To Reproduce
Create a Deno application that uses GoTrue, compile and try to run the compiled program. (sorry if this is vague, its the best I can easily give)
The following error appears:
error: Uncaught NotSupported: LocalStorage is not supported in this context.
at https://esm.sh/v130/@supabase/gotrue-js@2.46.1/denonext/gotrue-js.mjs:4:26743
Expected behavior
It shouldn't error.
System information
OS: [e.g. macOS, Windows] Windows 10
Version of supabase-js: [e.g. 6.0.2] 2.32.0
Version of Node.js: [e.g. 10.10.0] N/A
Additional context
I've created a simple fix and will create a PR shortly.
Bug report
Describe the bug
This would normally not break anything in a normal Javascript environment. However, if using Deno and compiling to an executable, it breaks as Deno executables can't access localStorage.
To Reproduce
Create a Deno application that uses GoTrue, compile and try to run the compiled program. (sorry if this is vague, its the best I can easily give)
The following error appears:
Expected behavior
It shouldn't error.
System information
Additional context
I've created a simple fix and will create a PR shortly.