mirror of
https://git.um-react.app/um/web.git
synced 2026-11-25 06:36:59 +00:00
fix: crash due to chrome been undefined
(cherry picked from commit 53a2073cb482fc9deef7aa0ddf45447c6971d819)
This commit is contained in:
1 parent
c895c5c069
commit
fd54617c5c
1 file changed
+1
-1
@@ -4,7 +4,7 @@ declare var chrome: any;
|
||||
|
||||
export default class ChromeExtensionStorage extends BaseStorage {
|
||||
static get works(): boolean {
|
||||
return Boolean(chrome?.storage?.local?.set);
|
||||
return typeof chrome !== 'undefined' && Boolean(chrome?.storage?.local?.set);
|
||||
}
|
||||
|
||||
protected async load<T>(name: string, defaultValue: T): Promise<T> {
|
||||
|
||||
Reference in new issue
Block a user