mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-20 04:14:23 +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 prevIndex = this.keys.get(key);
|
||||
|
||||
if (prevIndex === undefined) {
|
||||
if (typeof prevIndex === 'undefined') {
|
||||
this.keys.set(key, this.length);
|
||||
this.values[this.length++] = value;
|
||||
} else if (forceReplace) {
|
||||
|
|
Loading…
Reference in a new issue