Fix checking unknown components
Hopefully fixes the lag switching channels when Discord has been open for a while. https://discordapp.com/channels/400734824740028417/423193907736870920/573535069764059157
This commit is contained in:
parent
f2c461d16e
commit
9c4653ffd4
|
@ -322,7 +322,6 @@ export class ReactComponents {
|
|||
}
|
||||
|
||||
static processUnknown(component, retVal) {
|
||||
const have = this.unknownComponents.find(c => c.component === component);
|
||||
for (const [fi, filter] of this.nameSetters.entries()) {
|
||||
if (filter.filter.filter(component)) {
|
||||
Logger.log('ReactComponents', 'Filter match!');
|
||||
|
@ -331,9 +330,8 @@ export class ReactComponents {
|
|||
return this.push(component, retVal);
|
||||
}
|
||||
}
|
||||
if (have) return have;
|
||||
this.unknownComponents.push(component);
|
||||
return component;
|
||||
|
||||
if (!this.unknownComponents.includes(component)) this.unknownComponents.push(component);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue