fix: ensure we dont add the contentProvider twice by comparing constructor names
This commit is contained in:
parent
8b581ee98e
commit
4c47a6f06b
|
@ -167,7 +167,11 @@ export default class WebEngine {
|
|||
}
|
||||
|
||||
public registerContentProvider(provider: BaseProvider) {
|
||||
if (this.contentProviders.includes(provider)) {
|
||||
if (
|
||||
this.contentProviders.filter(
|
||||
(item) => item.constructor.name === provider.constructor.name,
|
||||
).length
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue