Skip to content

Commit

Permalink
Try catch window.close
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Mar 6, 2023
1 parent 3f9419b commit a5a493a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/bookmarks/add/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ export const page = Component(() => {

function finish () {
if (query.get('jump') === 'close') {
window.close()
try {
window.close()
} catch (err) {
console.error(err)
// TODO: go to permalink?
window.location.replace('/bookmarks')
}
} else {
// TODO: go to permalink?
window.location.replace('/bookmarks')
Expand Down

0 comments on commit a5a493a

Please sign in to comment.