From 328a9c7cfa2a3ea46f48fdb9bf39a33035c837d7 Mon Sep 17 00:00:00 2001 From: umang Date: Tue, 22 Feb 2022 07:35:46 +0530 Subject: [PATCH] ref #29, fixed condition --- dist/index.js | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 6b7de10..d2e0e14 100644 --- a/dist/index.js +++ b/dist/index.js @@ -243,7 +243,7 @@ var jsLogger = /*#__PURE__*/function () { pending_logs = this.logs; } - if (pending_logs.length === 0) { + if (!pending_logs || pending_logs === 0) { this.isAjaxCompleted = true; this.endCheck(); return; diff --git a/src/index.js b/src/index.js index bc10bde..041a6b0 100644 --- a/src/index.js +++ b/src/index.js @@ -209,7 +209,7 @@ class jsLogger { pending_logs = this.logs; } - if (pending_logs.length === 0) { + if (!pending_logs || pending_logs === 0) { this.isAjaxCompleted = true; this.endCheck(); return;