Skip to content

Commit ed0ea2c

Browse files
committed
Solve issues in CLI.
1 parent 94752db commit ed0ea2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/cli/plugins/cli_cmd_plugin/source/cli_cmd_plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function command_initialize(plugin_path) {
2525
return fs.readdirSync(cmd_path);
2626
} catch (e) {
2727
/* If the directory does not exist, return no files */
28-
if (e?.code === 'ENOENT') {
28+
if (e !== undefined && e.code === 'ENOENT') {
2929
return []
3030
}
3131

source/cli/plugins/cli_repl_plugin/source/cli_repl_plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function repl_initialize(plugin_path) {
4141
return fs.readdirSync(repl_path);
4242
} catch (e) {
4343
/* If the directory does not exist, return no files */
44-
if (e?.code === 'ENOENT') {
44+
if (e !== undefined && e.code === 'ENOENT') {
4545
return []
4646
}
4747

0 commit comments

Comments
 (0)