Remove type cast in ol/structs/LRUCache

This commit is contained in:
Frederic Junod
2018-12-12 14:48:24 +01:00
parent 056568c936
commit 29702e3750

View File

@@ -261,12 +261,12 @@ class LRUCache extends EventTarget {
set(key, value) {
assert(!(key in this.entries_),
16); // Tried to set a value for a key that is used already
const entry = /** @type {Entry} */ ({
const entry = {
key_: key,
newer: null,
older: this.newest_,
value_: value
});
};
if (!this.newest_) {
this.oldest_ = entry;
} else {