Skip to content

Commit

Permalink
Merge pull request #2157 from headlamp-k8s/resource-creation-bug
Browse files Browse the repository at this point in the history
frontend: Prevent success pop-up on invalid operations
  • Loading branch information
joaquimrocha authored Jul 24, 2024
2 parents 0fc5ff8 + 99e17ab commit 2caefb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/redux/clusterActionSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export const executeClusterAction = createAsyncThunk(
if (controller.signal.aborted) {
return rejectWithValue('Action cancelled');
}
callback();
await Promise.resolve(callback());
dispatchSuccess();
} catch (err) {
if ((err as Error).message === 'Action cancelled' || controller.signal.aborted) {
Expand Down

0 comments on commit 2caefb8

Please sign in to comment.