From b81dd7ef3c5d72fb7421b3f0ac90aaf6d00b344d Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Thu, 12 Oct 2023 21:24:28 +0200 Subject: [PATCH] 0.5.14 Missing catch --- manifest.json | 2 +- package.json | 2 +- src/note.ts | 19 +++++++++++-------- versions.json | 3 ++- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index 2ae6f8e..3292680 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "share-note", "name": "Share Note", - "version": "0.5.13", + "version": "0.5.14", "minAppVersion": "0.15.0", "description": "Instantly share a note, with the full theme and content exactly like you see in Reading View. Data is shared encrypted by default, and only you and the person you send it to have the key.", "author": "Alan Grainger", diff --git a/package.json b/package.json index a138354..f704198 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "share-note", - "version": "0.5.13", + "version": "0.5.14", "description": "Instantly share a note, with the full theme and content exactly like you see in Reading View. Data is shared encrypted by default, and only you and the person you send it to have the key.", "main": "main.js", "scripts": { diff --git a/src/note.ts b/src/note.ts index 872ff7d..337c9f5 100644 --- a/src/note.ts +++ b/src/note.ts @@ -279,7 +279,7 @@ export default class Note { this.status.setStatus('Processing attachment ' + (count++) + '...') resolve() }) - .catch(() => resolve()) + .catch(resolve) })) } el.removeAttribute('alt') @@ -344,6 +344,7 @@ export default class Note { cssNotice.setMessage(cssNoticeText + `\n\nUploaded ${count++} of ${total} theme files`) resolve() }) + .catch(resolve) })) } } @@ -371,7 +372,7 @@ export default class Note { cssNotice.setMessage(cssNoticeText + `\n\nUploaded ${count++} of ${total} theme files`) resolve() }) - .catch(() => resolve()) + .catch(resolve) })) } } @@ -384,12 +385,14 @@ export default class Note { await Promise.all(promises) // Upload the main CSS file cssNotice.setMessage(cssNoticeText + `\n\nUploaded ${total - 1} of ${total} theme files`) - await this.plugin.api.upload({ - filetype: 'css', - hash: await sha1(this.css), - content: this.css, - byteLength: this.css.length - }) + try { + await this.plugin.api.upload({ + filetype: 'css', + hash: await sha1(this.css), + content: this.css, + byteLength: this.css.length + }) + } catch (e) { } cssNotice.hide() } diff --git a/versions.json b/versions.json index 7308fae..fd75e7d 100644 --- a/versions.json +++ b/versions.json @@ -12,5 +12,6 @@ "0.5.10": "0.15.0", "0.5.11": "0.15.0", "0.5.12": "0.15.0", - "0.5.13": "0.15.0" + "0.5.13": "0.15.0", + "0.5.14": "0.15.0" }