From 836219212cef2d93a5702bf25b8237ca73c5ce8c Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Sun, 12 Sep 2021 23:47:20 +0200 Subject: [PATCH] Small fixes and update neo-scraper to 0.4.6 --- package.json | 4 ++-- src/SzuruWrapper.ts | 2 +- src/popup/App.vue | 55 +++++++++++++++++++++++++++------------------ yarn.lock | 8 +++---- 4 files changed, 40 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index caefc87..f5cf25a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "szuru-chrome", - "version": "0.7.3", + "version": "0.7.4", "description": "Import media from various sites into szurubooru.", "author": "neobooru", "license": "MIT", @@ -17,7 +17,7 @@ }, "dependencies": { "axios": "^0.21.1", - "neo-scraper": "^0.4.5", + "neo-scraper": "^0.4.6", "vue": "^2.6.11", "webextension-polyfill": "^0.3.1" }, diff --git a/src/SzuruWrapper.ts b/src/SzuruWrapper.ts index d88c407..a2c3fcd 100644 --- a/src/SzuruWrapper.ts +++ b/src/SzuruWrapper.ts @@ -132,7 +132,7 @@ export default class SzuruWrapper { try { return await axios(config); } catch (ex) { - const error = ex.response.data as SzuruError; + const error = ex.response?.data as SzuruError | undefined; throw error ? error : ex; } } diff --git a/src/popup/App.vue b/src/popup/App.vue index 0072213..34c1664 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -2,7 +2,12 @@