Skip to content

Commit

Permalink
fix: parsed yaml null
Browse files Browse the repository at this point in the history
  • Loading branch information
couriourc committed Sep 8, 2024
1 parent a8e3747 commit 4d0dbc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ const logger = new Logger({
logger.error("Manifest need main field!");
}
const main = await import( path.resolve(path.dirname(path.resolve(resolvedPluginPath, file)), plugin.main));
const enabled = parsedConfig.plugins?.[plugin.name]?.enabled ?? true;
const enabled = parsedConfig?.plugins?.[plugin.name]?.enabled ?? true;
if (!enabled) continue;
if (typeof main.default === "function") {
plugins.push({
name: plugin.name,
execute: main.default,
option: parsedConfig.plugins?.[plugin.name] ?? {}
option: parsedConfig?.plugins?.[plugin.name] ?? {}
});
}
}
Expand Down

0 comments on commit 4d0dbc6

Please sign in to comment.