From ef9c4c6ac3d58e18cd44580caad14e125df1b534 Mon Sep 17 00:00:00 2001 From: Nur Rony Date: Sun, 24 Mar 2024 00:14:47 +0600 Subject: [PATCH] fix(downloader): add missing onError hook for fetches only it was missing before closes #159 --- src/Downloader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Downloader.js b/src/Downloader.js index d7d5ece..a7e8d55 100644 --- a/src/Downloader.js +++ b/src/Downloader.js @@ -431,6 +431,9 @@ class Downloader { return item$; } catch ({ name, message }) { this.errors.push({ url: item, name, message }); + if (this.onError) { + this.onError({ url: item, name, message }); + } } }) )