*Importing a plugin may be ESM and so check for the default property

This commit is contained in:
Derrick Hammer 2022-08-28 00:27:20 -04:00
parent 7cfad02ae5
commit 17da91a558
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ export class PluginApiManager {
} catch (e) {
throw e;
}
if ("default" in plugin) {
plugin = plugin?.default as Plugin;
}
plugin.name = sanitizeName(plugin.name);