From 94d9c04cf2ec8eaa1382b4d517b5a35f3ae5da04 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 22 May 2024 19:48:15 -0300 Subject: [PATCH] fix: remove optional chaining --- lib/client/hijack/wrapSubscription.js | 2 +- lib/client/models/webVitals.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/client/hijack/wrapSubscription.js b/lib/client/hijack/wrapSubscription.js index e19661da..d81f4ff1 100644 --- a/lib/client/hijack/wrapSubscription.js +++ b/lib/client/hijack/wrapSubscription.js @@ -27,7 +27,7 @@ export function wrapSubscription () { const onReady = () => { Kadira.webVitals.completedObjects += 1; Kadira.webVitals.subs.push({ start, end: Ntp._now() }); - oldReady?.(); + 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 69a62642..6b74eef3 100644 --- a/lib/client/models/webVitals.js +++ b/lib/client/models/webVitals.js @@ -209,7 +209,6 @@ export class WebVitalsModel { },{}), ...browserInfo, commitHash: Meteor.gitCommitHash, - cacheCleaned: !localStorage?.length && !sessionStorage?.length, archVersion: getClientArchVersion(arch), incompleteSession: this.pendingObjects > 0 && this.pendingObjects > this.completedObjects };