Skip to content

Commit

Permalink
Adjusted redundant code in the handle command middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Jan 21, 2025
1 parent c03d133 commit 52a3ba7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ export const handleCommand = async <Store extends EventStore>(
): Promise<ShoppingCartEvent | ShoppingCartEvent[]> => {
await authorize(handleOptions.requestHeaders);

const result = Promise.resolve(decide(state));

return result;
return decide(state);
},
handleOptions,
);
Expand Down

0 comments on commit 52a3ba7

Please sign in to comment.