+try {
+ peertubeLocalStorage = localStorage
+ peertubeSessionStorage = sessionStorage
+} catch (err) {
+ // support Firefox and other browsers using an exception rather than null
+ reinitStorage()
+}
+
+// support Brave and other browsers using null rather than an exception
+if (peertubeLocalStorage === null || peertubeSessionStorage === null) {
+ reinitStorage()
+}
+