From 90b868eb8a5285d2f717c4e4d2e913e10d9ff9b5 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 22 May 2024 19:51:22 -0300 Subject: [PATCH] fix: lint --- lib/client/hijack/wrapSubscription.js | 4 +++- lib/client/models/webVitals.js | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/client/hijack/wrapSubscription.js b/lib/client/hijack/wrapSubscription.js index d81f4ff1..3354c90e 100644 --- a/lib/client/hijack/wrapSubscription.js +++ b/lib/client/hijack/wrapSubscription.js @@ -27,7 +27,9 @@ export function wrapSubscription () { const onReady = () => { Kadira.webVitals.completedObjects += 1; Kadira.webVitals.subs.push({ start, end: Ntp._now() }); - oldReady && oldReady(); + if (oldReady) { + oldReady(); + } }; callbacks.onReady = onReady; return oldSubscribe(arguments[0],...params, callbacks); diff --git a/lib/client/models/webVitals.js b/lib/client/models/webVitals.js index 6b74eef3..2d5a17c4 100644 --- a/lib/client/models/webVitals.js +++ b/lib/client/models/webVitals.js @@ -98,7 +98,6 @@ export class WebVitalsModel { } else { document.addEventListener('readystatechange', () => { if (document.readyState === 'complete') { - console.log('COMPLETE'); /* stop tracking new dynamic imports/methods/publications */ this.stopTracking(); }