Skip to content

Commit 4cfce2d

Browse files
committed
globalThis prettier fixes
1 parent 033ec52 commit 4cfce2d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/lnc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ export default class LNC {
195195
);
196196

197197
// add an event listener to disconnect if the page is unloaded
198-
if (typeof window !== "undefined") {
198+
if (typeof window !== 'undefined') {
199199
window.addEventListener('unload', this.wasm.wasmClientDisconnect);
200200
} else {
201-
log.info("No unload event listener added. window is not available");
201+
log.info('No unload event listener added. window is not available');
202202
}
203203

204204
// repeatedly check if the connection was successful

lib/util/log.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ export class Logger {
2727
// by default, log nothing (assuming prod)
2828
let level = LogLevel.none;
2929

30-
if (globalThis.localStorage && globalThis.localStorage.getItem('debug')) {
30+
if (
31+
globalThis.localStorage &&
32+
globalThis.localStorage.getItem('debug')
33+
) {
3134
// if a 'debug' key is found in localStorage, use the level in storage or 'debug' by default
32-
const storageLevel = globalThis.localStorage.getItem('debug-level') || 'debug';
35+
const storageLevel =
36+
globalThis.localStorage.getItem('debug-level') || 'debug';
3337
level = LogLevel[storageLevel as keyof typeof LogLevel];
3438
}
3539

0 commit comments

Comments
 (0)