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)) {
const message = `got "${typeof evaluated}" instead of pattern`;
throw new Error(message + (typeof evaluated === 'function' ? ', did you forget to call a function?' : '.'));
pattern = silence;
}
logger(`[eval] code updated`);
pattern = await setPattern(pattern, autostart);