mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-21 12:53:11 +01:00
Replaced undefined
check with the type check
This commit is contained in:
parent
235d7ab362
commit
5da1080ed9
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ export class UniqueHeap<T> {
|
||||||
const key = this.unique(value);
|
const key = this.unique(value);
|
||||||
const prevIndex = this.keys.get(key);
|
const prevIndex = this.keys.get(key);
|
||||||
|
|
||||||
if (prevIndex === undefined) {
|
if (typeof prevIndex === 'undefined') {
|
||||||
this.keys.set(key, this.length);
|
this.keys.set(key, this.length);
|
||||||
this.values[this.length++] = value;
|
this.values[this.length++] = value;
|
||||||
} else if (forceReplace) {
|
} else if (forceReplace) {
|
||||||
|
|
Loading…
Reference in a new issue