commit 96c771b9aa82ac385d58c65068baf5a1169478a8
parent a872275cd374b4cade1f4d8ef4bc88d2c3cff557
Author: 0-l <b-coimbra@hotmail.com>
Date: Thu, 22 Jul 2021 23:20:51 -0300
Fix `!uwu` breaking when `transform` returns undefined
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/commands/uwu.ts b/lib/commands/uwu.ts
@@ -101,6 +101,7 @@ export default (homescope: HomeScope) => {
}
}
}
+ return stream;
};
const stutter = (stream: string) => {
@@ -126,7 +127,7 @@ export default (homescope: HomeScope) => {
let transformed = transform(word);
- if (typeof transformed === 'undefined')
+ if (!transformed)
transformed = enclose(word);
transformed = replace_swearwords(transformed);