We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1f449 commit d05210dCopy full SHA for d05210d
docs/src/kolibri/observable.js
@@ -4,11 +4,13 @@ import { LOG_CONTEXT_KOLIBRI_BASE } from "./logger/logConstants.js";
4
5
export {Observable, ObservableList}
6
7
-const { warn } = LoggerFactory(LOG_CONTEXT_KOLIBRI_BASE + ".observable");
8
-
+let warn = undefined;
9
/** @private */
10
function checkWarning(list) {
11
if (list.length > 100) {
+ if (!warn) {
12
+ warn = LoggerFactory(LOG_CONTEXT_KOLIBRI_BASE + ".observable").warn;
13
+ }
14
warn(`Beware of memory leak. ${list.length} listeners.`);
15
}
16
0 commit comments