Remove uniqueness check for requirements (#1790)
This commit is contained in:
parent
f7d177e6d0
commit
82b7ebfa58
@ -32,7 +32,6 @@ class TemplateRenderer {
|
|||||||
this._dataTypes = new Map();
|
this._dataTypes = new Map();
|
||||||
this._requirements = null;
|
this._requirements = null;
|
||||||
this._cleanupCallbacks = null;
|
this._cleanupCallbacks = null;
|
||||||
this._customData = null;
|
|
||||||
this._temporaryElement = null;
|
this._temporaryElement = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +92,6 @@ class TemplateRenderer {
|
|||||||
const cleanupCallbacks = [];
|
const cleanupCallbacks = [];
|
||||||
const requirements = [];
|
const requirements = [];
|
||||||
try {
|
try {
|
||||||
this._customData = {};
|
|
||||||
this._stateStack = [new Map()];
|
this._stateStack = [new Map()];
|
||||||
this._requirements = requirements;
|
this._requirements = requirements;
|
||||||
this._cleanupCallbacks = cleanupCallbacks;
|
this._cleanupCallbacks = cleanupCallbacks;
|
||||||
@ -104,7 +102,6 @@ class TemplateRenderer {
|
|||||||
this._stateStack = null;
|
this._stateStack = null;
|
||||||
this._requirements = null;
|
this._requirements = null;
|
||||||
this._cleanupCallbacks = null;
|
this._cleanupCallbacks = null;
|
||||||
this._customData = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,14 +585,6 @@ class TemplateRenderer {
|
|||||||
onLoad(imageUrl);
|
onLoad(imageUrl);
|
||||||
this._cleanupCallbacks.push(() => onUnload(true));
|
this._cleanupCallbacks.push(() => onUnload(true));
|
||||||
} else {
|
} else {
|
||||||
let set = this._customData.requiredDictionaryMedia;
|
|
||||||
if (typeof set === 'undefined') {
|
|
||||||
set = new Set();
|
|
||||||
this._customData.requiredDictionaryMedia = set;
|
|
||||||
}
|
|
||||||
const key = JSON.stringify([dictionary, path]);
|
|
||||||
if (!set.has(key)) {
|
|
||||||
set.add(key);
|
|
||||||
this._requirements.push({
|
this._requirements.push({
|
||||||
type: 'dictionaryMedia',
|
type: 'dictionaryMedia',
|
||||||
dictionary,
|
dictionary,
|
||||||
@ -603,7 +592,6 @@ class TemplateRenderer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return new StructuredContentGenerator(mediaLoader, document);
|
return new StructuredContentGenerator(mediaLoader, document);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user