mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-03-02 06:18:50 +00:00
Fix debuglogs window
This commit is contained in:
@@ -68,7 +68,7 @@ function getSubsystemColor(name: string): string {
|
||||
|
||||
let cachedPattern: RegExp | undefined;
|
||||
|
||||
if ('window' in global && window.localStorage) {
|
||||
if (typeof window !== 'undefined' && window.localStorage) {
|
||||
window.addEventListener('storage', event => {
|
||||
if (event.key === 'debug') {
|
||||
cachedPattern = undefined;
|
||||
@@ -82,10 +82,10 @@ function getPattern(): RegExp {
|
||||
}
|
||||
|
||||
let value = '';
|
||||
if ('window' in global && window.localStorage) {
|
||||
if (typeof window !== 'undefined' && window.localStorage) {
|
||||
value = window.localStorage.getItem('debug') || '';
|
||||
}
|
||||
if ('process' in global) {
|
||||
if (typeof process !== 'undefined' && process.env) {
|
||||
value = value || process.env.DEBUG || '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user