fix: return silence when no pattern is returned

This commit is contained in:
Felix Roos 2025-11-27 22:53:38 +01:00
parent 30cd486f37
commit ec26392509
No known key found for this signature in database

View file

@ -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);