Skip to content

Commit

Permalink
fix: Filter out file: URLs when syncing tabs on firefox
Browse files Browse the repository at this point in the history
fixes #1627

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Aug 26, 2024
1 parent be68758 commit 63fca7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/LocalTabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export default class LocalTabs implements IResource<typeof ItemLocation.LOCAL> {
Logger.log('Parent is "tabs", ignoring this one.')
return
}
if (self.location.protocol === 'moz-extension:' && new URL(bookmark.url).protocol === 'file:') {
Logger.log('URL is a file URL and we are on firefox, ignoring this one.')
return
}
const node = await this.queue.add(() =>
browser.tabs.create({
windowId: typeof bookmark.parentId === 'string' ? parseInt(bookmark.parentId) : bookmark.parentId,
Expand Down

0 comments on commit 63fca7e

Please sign in to comment.