Skip to content

remove dep on globalthis #148

@jimmywarting

Description

@jimmywarting

seriously, you do not need globalThis...

clientjs/src/client.base.js

Lines 580 to 586 in 08cb26b

isLocalStorage: function() {
try {
return !!globalThis.localStorage;
} catch (e) {
return true; // SecurityError when referencing it means it exists
}
},

just use typeof LocalStorage !== 'undefined' instead... don't even need a try catch for that...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions