diff --git a/lib/FredyRuntime.js b/lib/FredyRuntime.js index 0513d36..412ac64 100755 --- a/lib/FredyRuntime.js +++ b/lib/FredyRuntime.js @@ -106,6 +106,9 @@ class FredyRuntime { } _notify(newListings) { + if (newListings.length === 0) { + throw new NoNewListingsWarning(); + } const sendNotifications = notify.send(this._providerId, newListings, this._notificationConfig, this._jobKey); return Promise.all(sendNotifications).then(() => newListings); }