refactor: remove unnecessary nullish short circuit

This commit is contained in:
Jacob Nguyen
2022-05-29 14:39:37 -05:00
parent ae59acadcc
commit cfd68b4388

View File

@@ -42,9 +42,9 @@ export const onMessageCreate = (wrapper: Wrapper) => {
const processEventPlugins$ = ensureModuleType$.pipe(
concatMap(({ ctx, args, mod }) => {
const res = Promise.all(
mod.onEvent?.map(ePlug => {
mod.onEvent.map(ePlug => {
return ePlug.execute([ctx, args], controller);
}) ?? [],
}),
);
return from(res).pipe(map(res => ({ mod, ctx, args, res })));
}),