Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99b8604

Browse files
committed
clear errors on success
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent2b73484 commit99b8604

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎web-app/src/services/state/actions/context.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ const contextActions: ActionFunctionMap<T.MachineContext, T.MachineEvent> = {
220220
},
221221
}),
222222
//@ts-ignore
223+
clearError:assign({
224+
error:():any=>null,
225+
}),
226+
//@ts-ignore
223227
checkEmptySteps:send((context:T.MachineContext)=>{
224228
// no step id indicates no steps to complete
225229
return{

‎web-app/src/services/state/machine.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const createMachine = (options: any) => {
6363
},
6464
ValidateSetup:{
6565
onEntry:['validateSetup'],
66+
onExit:['clearError'],
6667
on:{
6768
VALIDATE_SETUP_FAILED:{
6869
actions:['setError'],
@@ -87,6 +88,7 @@ export const createMachine = (options: any) => {
8788
},
8889
SetupNewTutorial:{
8990
onEntry:['configureNewTutorial'],
91+
onExit:['clearError'],
9092
on:{
9193
TUTORIAL_CONFIGURE_FAIL:{
9294
actions:['setError'],
@@ -118,6 +120,7 @@ export const createMachine = (options: any) => {
118120
actions:['commandFail'],
119121
},
120122
ERROR:{
123+
// TODO: missing clearError
121124
actions:['setError'],
122125
},
123126
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp