Skip to content

Commit

Permalink
Trigger handler only after certain rejections
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascensionist committed Oct 20, 2024
1 parent fdfd55a commit de24848
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,13 @@ export default {
});
// https://github.com/SaturnMusic/PC/issues/26
window.addEventListener("unhandledrejection", (event) => { console.log("Unhandled promise rejection!\n", event.promise, event.reason); if(!this.$rooms.room){this.$root.skipNext()}});
window.addEventListener("unhandledrejection", (event) => {
console.log("Unhandled promise rejection!\n", event.promise, event.reason);
if (!this.$rooms.room && !event.reason.startsWith("The play() request"))
{
this.$root.skipNext()
}
});
//Check for update
this.checkUpdate();
Expand Down
3 changes: 2 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"license": "ISC",
"dependencies": {
"arg": "^5.0.0",
"md5": "^2.3.0",
"axios": "^0.21.1",
"browser-id3-writer": "^4.4.0",
"chalk": "^4.1.1",
Expand All @@ -21,9 +20,11 @@
"discord-rpc": "^3.2.0",
"express": "^4.17.1",
"lastfmapi": "^0.1.1",
"md5": "^2.3.0",
"metaflac-js2": "^1.0.7",
"nedb": "^1.8.0",
"nodeezcryptor": "git+https://github.com/SaturnMusic/encryption.git",
"original-fs": "^1.2.0",
"sanitize-filename": "^1.6.3",
"socket.io": "^4.1.2",
"winston": "^3.3.3"
Expand Down

0 comments on commit de24848

Please sign in to comment.