Merge pull request #17764 from calixteman/telemetry_null_stats
[Editor] Use a null instead of an empty stats object when sending the telemetry
This commit is contained in:
commit
c451b6d684
@ -214,7 +214,7 @@ class AnnotationStorage {
|
||||
}
|
||||
|
||||
get editorStats() {
|
||||
const stats = Object.create(null);
|
||||
let stats = null;
|
||||
const typeToEditor = new Map();
|
||||
for (const value of this.#storage.values()) {
|
||||
if (!(value instanceof AnnotationEditor)) {
|
||||
@ -228,6 +228,7 @@ class AnnotationStorage {
|
||||
if (!typeToEditor.has(type)) {
|
||||
typeToEditor.set(type, Object.getPrototypeOf(value).constructor);
|
||||
}
|
||||
stats ||= Object.create(null);
|
||||
const map = (stats[type] ||= new Map());
|
||||
for (const [key, val] of Object.entries(editorStats)) {
|
||||
if (key === "type") {
|
||||
|
Loading…
Reference in New Issue
Block a user