diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-03 11:35:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 11:35:03 -0400 |
commit | 82b7ebfa58c1d68916d66ffb49a0407a7dfc7aba (patch) | |
tree | a362e3730c24c04fab0d9eb4966aabbf9567fced | |
parent | f7d177e6d0f970ba6600fbf3911fccc093553eef (diff) |
Remove uniqueness check for requirements (#1790)
-rw-r--r-- | ext/js/templates/template-renderer.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/ext/js/templates/template-renderer.js b/ext/js/templates/template-renderer.js index 8c62a3cd..f9fbdeb5 100644 --- a/ext/js/templates/template-renderer.js +++ b/ext/js/templates/template-renderer.js @@ -32,7 +32,6 @@ class TemplateRenderer { this._dataTypes = new Map(); this._requirements = null; this._cleanupCallbacks = null; - this._customData = null; this._temporaryElement = null; } @@ -93,7 +92,6 @@ class TemplateRenderer { const cleanupCallbacks = []; const requirements = []; try { - this._customData = {}; this._stateStack = [new Map()]; this._requirements = requirements; this._cleanupCallbacks = cleanupCallbacks; @@ -104,7 +102,6 @@ class TemplateRenderer { this._stateStack = null; this._requirements = null; this._cleanupCallbacks = null; - this._customData = null; } } @@ -588,20 +585,11 @@ class TemplateRenderer { onLoad(imageUrl); this._cleanupCallbacks.push(() => onUnload(true)); } 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({ - type: 'dictionaryMedia', - dictionary, - path - }); - } + this._requirements.push({ + type: 'dictionaryMedia', + dictionary, + path + }); } } }; |