mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
Fix !== null checks
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 82bf646a77...38c26d9649
@@ -153,7 +153,7 @@ export default class RuntimeBackground {
|
|||||||
tab: msg.tab,
|
tab: msg.tab,
|
||||||
details: msg.details,
|
details: msg.details,
|
||||||
}], msg.sender === 'autofill_cmd');
|
}], msg.sender === 'autofill_cmd');
|
||||||
if (totpCode !== null) {
|
if (totpCode != null) {
|
||||||
this.platformUtilsService.copyToClipboard(totpCode, { window: window });
|
this.platformUtilsService.copyToClipboard(totpCode, { window: window });
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -181,7 +181,7 @@ export default class RuntimeBackground {
|
|||||||
pageDetails: this.pageDetailsToAutoFill,
|
pageDetails: this.pageDetailsToAutoFill,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (totpCode !== null) {
|
if (totpCode != null) {
|
||||||
this.platformUtilsService.copyToClipboard(totpCode, { window: window });
|
this.platformUtilsService.copyToClipboard(totpCode, { window: window });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default class BrowserStorageService implements StorageService {
|
|||||||
const json = this.safariStorageApi.getItem(key);
|
const json = this.safariStorageApi.getItem(key);
|
||||||
if (json) {
|
if (json) {
|
||||||
const obj = JSON.parse(json);
|
const obj = JSON.parse(json);
|
||||||
if (obj && (typeof obj[key] !== 'undefined') && obj[key] !== null) {
|
if (obj != null && obj[key] != null) {
|
||||||
resolve(obj[key] as T);
|
resolve(obj[key] as T);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ export default class BrowserStorageService implements StorageService {
|
|||||||
} else {
|
} else {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
this.chromeStorageApi.get(key, (obj: any) => {
|
this.chromeStorageApi.get(key, (obj: any) => {
|
||||||
if (obj && (typeof obj[key] !== 'undefined') && obj[key] !== null) {
|
if (obj != null && obj[key] != null) {
|
||||||
resolve(obj[key] as T);
|
resolve(obj[key] as T);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user