Skip to content

Commit

Permalink
fix: Ignore errors from browser.permissions.contains
Browse files Browse the repository at this point in the history
try to fix #1585

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed May 3, 2024
1 parent 595a0ec commit c1e8638
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/adapters/NextcloudBookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ export default class NextcloudBookmarksAdapter implements Adapter, BulkImportRes
async onSyncStart(needLock = true): Promise<void> {
if (Capacitor.getPlatform() === 'web') {
const browser = (await import('../browser-api')).default
if (!(await browser.permissions.contains({ origins: [this.server.url + '/'] }))) {
let hasPermissions
try {
hasPermissions = await browser.permissions.contains({ origins: [this.server.url + '/'] })
} catch (e) {
console.warn(e)
}
if (!hasPermissions) {
throw new MissingPermissionsError()
}
}
Expand Down

2 comments on commit c1e8638

@Alexisthegger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any way you can make a browser so i can watch YouTube on it because they deleted the last one that was similar to Firefox.

@marcelklehr
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I don't think so :D Making a browser is a huge effort. I already have my hands full with this :D

Please sign in to comment.