Skip to content

Commit 60fb80d

Browse files
authored
Merge pull request #2010 from bershanskiy/b-13039
Bug 1967425 - remove faulty check for sessionStorage to prevent uncau…
2 parents a7b7e1f + 5e20701 commit 60fb80d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unreleased changes
22

3+
* [#2010](https://github.com/mozilla/glean.js/pull/2010): Remove faulty check for sessionStorage to prevent uncaught error.
4+
35
[Full changelog](https://github.com/mozilla/glean.js/compare/v5.0.5...main)
46

57
* [#2011](https://github.com/mozilla/glean.js/pull/2011): Bug 1987158 - Capture page `url`/`referrer`/`title` with `recordElementClick()`.

glean/src/core/glean.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,6 @@ namespace Glean {
194194
* Fetch debug options from SessionStorage and set the Glean preInit debug options.
195195
*/
196196
function setDebugOptionsFromSessionStorage() {
197-
// If we cannot access browser APIs, we do nothing.
198-
if (
199-
typeof window === "undefined" ||
200-
typeof window.sessionStorage === "undefined"
201-
) {
202-
return;
203-
}
204-
205197
const logPings = getDebugOptionFromSessionStorage(DebugOption.LogPings);
206198
if (logPings) {
207199
preInitLogPings = extractBooleanFromString(logPings);

0 commit comments

Comments
 (0)