Skip to content

Commit a69041d

Browse files
committed
Don't set invalid destination window id
1 parent f32c3f6 commit a69041d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

webextensions/background/tree.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* The Original Code is the Tree Style Tab.
1515
*
1616
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
17-
* Portions created by the Initial Developer are Copyright (C) 2011-2024
17+
* Portions created by the Initial Developer are Copyright (C) 2011-2025
1818
* the Initial Developer. All Rights Reserved.
1919
*
2020
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex@gmail.com>
@@ -1461,8 +1461,9 @@ export async function moveTabs(tabs, options = {}) {
14611461
let newWindow = options.destinationPromisedNewWindow;
14621462

14631463
let destinationWindowId = options.destinationWindowId;
1464-
if (!destinationWindowId && !newWindow)
1465-
destinationWindowId = TabsStore.getCurrentWindowId();
1464+
if (!destinationWindowId && !newWindow) {
1465+
destinationWindowId = TabsStore.getCurrentWindowId() || windowId;
1466+
}
14661467

14671468
const isAcrossWindows = windowId != destinationWindowId || !!newWindow;
14681469

0 commit comments

Comments
 (0)