Skip to content

Commit 52a3ba7

Browse files
committed
Adjusted redundant code in the handle command middleware
1 parent c03d133 commit 52a3ba7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/packages/emmett/src/commandHandling/handleCommand.middleware.unit.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ export const handleCommand = async <Store extends EventStore>(
9292
): Promise<ShoppingCartEvent | ShoppingCartEvent[]> => {
9393
await authorize(handleOptions.requestHeaders);
9494

95-
const result = Promise.resolve(decide(state));
96-
97-
return result;
95+
return decide(state);
9896
},
9997
handleOptions,
10098
);

0 commit comments

Comments
 (0)