make multiple calls to start() harmless

main
Avraham Sakal 2 years ago
parent f205f66a75
commit 38021baf64

@ -66,11 +66,15 @@ export function Interpreter(machine:Machine_T, initialContext:any, initialStateN
return interpreter;
}
export function start(interpreter:Interpreter_T){
interpreter.isPaused = false;
processEvents(interpreter);
if(interpreter.isPaused === true){
interpreter.isPaused = false;
processEvents(interpreter);
}
}
export function pause(interpreter:Interpreter_T){
interpreter.isPaused = true;
if(interpreter.isPaused === false){
interpreter.isPaused = true;
}
}
/** Helper function for `send()`

Loading…
Cancel
Save