diff --git a/src/service/request.js b/src/service/request.js index fb82621d..2c747cad 100644 --- a/src/service/request.js +++ b/src/service/request.js @@ -288,6 +288,7 @@ export function $throw(code, error, endpoint) { let ignoreError = false; if ( (code === 404 || code === -1) && + typeof endpoint === 'string' && endpoint.split('/').length === 2 && (endpoint.startsWith('users/') || endpoint.startsWith('worlds/') || @@ -299,11 +300,11 @@ export function $throw(code, error, endpoint) { } if ( (code === 403 || code === 404 || code === -1) && - endpoint.startsWith('instances/') + endpoint?.startsWith('instances/') ) { ignoreError = true; } - if (endpoint.startsWith('analysis/')) { + if (endpoint?.startsWith('analysis/')) { ignoreError = true; } if (text.length && !ignoreError) { diff --git a/src/stores/gameLog.js b/src/stores/gameLog.js index 23026ea0..b159b2e1 100644 --- a/src/stores/gameLog.js +++ b/src/stores/gameLog.js @@ -1399,11 +1399,13 @@ export const useGameLogStore = defineStore('GameLog', () => { confirmButtonText: 'Confirm', cancelButtonText: 'Cancel', type: 'info' - }).then(({ action }) => { - if (action === 'confirm') { - advancedSettingsStore.setGameLogDisabled(); - } - }); + }) + .then(({ action }) => { + if (action === 'confirm') { + advancedSettingsStore.setGameLogDisabled(); + } + }) + .catch(() => {}); } else { advancedSettingsStore.setGameLogDisabled(); } diff --git a/src/stores/settings/advanced.js b/src/stores/settings/advanced.js index a0c14536..0f97d5d4 100644 --- a/src/stores/settings/advanced.js +++ b/src/stores/settings/advanced.js @@ -549,7 +549,7 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => { * @param {string} videoId */ async function lookupYouTubeVideo(videoId) { - if (!youTubeApi.value) { + if (!youTubeApiKey.value) { console.warn('no Youtube API key configured'); return null; } diff --git a/src/views/FriendList/FriendList.vue b/src/views/FriendList/FriendList.vue index 6cdc7d53..41fc71c0 100644 --- a/src/views/FriendList/FriendList.vue +++ b/src/views/FriendList/FriendList.vue @@ -392,7 +392,7 @@ inputValue: pending.join('\r\n') } ) - .then((action) => { + .then(({ action }) => { if (action === 'confirm') { bulkUnfriendSelection(); } @@ -402,8 +402,10 @@ function bulkUnfriendSelection() { friendsListTable.data.forEach((item) => { - if (item.$selected) + if (item.$selected) { + console.log(`Unfriending ${item.displayName} (${item.id})`); friendRequest.deleteFriend({ userId: item.id }).then((args) => handleFriendDelete(args)); + } }); }