Skip to content

Commit fa79825

Browse files
committed
fix(core): when command prop value is boolean is ignore in command
1 parent e625259 commit fa79825

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/core/src/command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LesyCommand {
130130
} else if (this.isClass(cmd)) {
131131
cmdObj = new (cmd as any)() as Command;
132132
Object.keys(this.defaultProps).forEach((p: any) => {
133-
if (cmdObj[p]) return;
133+
if (cmdObj[p] != null) return;
134134
Object.defineProperty(cmdObj, p, {
135135
value: this.defaultProps[p],
136136
configurable: true,

packages/core/src/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class LesyCoreClass {
2626
{ commands, features, middlewares, plugins },
2727
root,
2828
);
29+
// todo: store plugin config under config.plugins
2930
for (const prop in this.loader.pluginConfigs) {
3031
config[prop] = this.loader.pluginConfigs[prop];
3132
}

0 commit comments

Comments
 (0)