fix: return silence when no pattern is returned
This commit is contained in:
parent
30cd486f37
commit
ec26392509
1 changed files with 1 additions and 2 deletions
|
|
@ -244,8 +244,7 @@ export function repl({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPattern(pattern)) {
|
if (!isPattern(pattern)) {
|
||||||
const message = `got "${typeof evaluated}" instead of pattern`;
|
pattern = silence;
|
||||||
throw new Error(message + (typeof evaluated === 'function' ? ', did you forget to call a function?' : '.'));
|
|
||||||
}
|
}
|
||||||
logger(`[eval] code updated`);
|
logger(`[eval] code updated`);
|
||||||
pattern = await setPattern(pattern, autostart);
|
pattern = await setPattern(pattern, autostart);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue