Commit 36b0bda5 authored by Robert Knight's avatar Robert Knight

Reset reference to unsubscribe function after calling it

parent e5c0606c
...@@ -13,7 +13,7 @@ import warnOnce from '../../shared/warn-once'; ...@@ -13,7 +13,7 @@ import warnOnce from '../../shared/warn-once';
let eventsSent = 0; let eventsSent = 0;
const maxEventsToSendPerSession = 5; const maxEventsToSendPerSession = 5;
/** @type {() => void} */ /** @type {(() => void)|null} */
let removeFrameErrorHandler; let removeFrameErrorHandler;
/** /**
...@@ -151,4 +151,5 @@ export function setUserInfo(user) { ...@@ -151,4 +151,5 @@ export function setUserInfo(user) {
export function reset() { export function reset() {
eventsSent = 0; eventsSent = 0;
removeFrameErrorHandler?.(); removeFrameErrorHandler?.();
removeFrameErrorHandler = null;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment