Explorar el Código

throw error on cancel

Gildas hace 1 año
padre
commit
d7b023f879
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/core/bg/downloads.js

+ 3 - 0
src/core/bg/downloads.js

@@ -237,6 +237,9 @@ async function downloadContent(contents, tab, incognito, message) {
 					replaceBookmarkURL: message.replaceBookmarkURL,
 					includeInfobar: message.includeInfobar
 				});
+				if (!response) {
+					throw new Error("upload_cancelled");
+				}
 			}
 			if (message.bookmarkId && message.replaceBookmarkURL && response && response.url) {
 				await bookmarks.update(message.bookmarkId, { url: response.url });