Skip to content

Commit 72e95cf

Browse files
wjianbophilc
authored andcommitted
Correct rawQueryList initialization
1 parent 06a2ced commit 72e95cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/find_mode_history.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ const FindModeHistory = {
1313
if (this.isIncognitoMode) this.key = "findModeRawQueryListIncognito";
1414

1515
let result = await this.storage.get(this.key);
16-
if (result[this.key]) {
17-
this.rawQueryList = result[this.key] || [];
18-
} else if (this.isIncognitoMode) {
16+
if (this.isIncognitoMode) {
1917
// This is the first incognito tab, so we need to initialize the incognito-mode query
2018
// history.
2119
result = await this.storage.get("findModeRawQueryList");
2220
this.rawQueryList = result.findModeRawQueryList || [];
2321
this.storage.set({ findModeRawQueryListIncognito: this.rawQueryList });
22+
} else {
23+
this.rawQueryList = result[this.key] || [];
2424
}
2525
}
2626

0 commit comments

Comments
 (0)