make multiple calls to start() harmless
This commit is contained in:
@@ -66,11 +66,15 @@ export function Interpreter(machine:Machine_T, initialContext:any, initialStateN
|
||||
return interpreter;
|
||||
}
|
||||
export function start(interpreter:Interpreter_T){
|
||||
if(interpreter.isPaused === true){
|
||||
interpreter.isPaused = false;
|
||||
processEvents(interpreter);
|
||||
}
|
||||
}
|
||||
export function pause(interpreter:Interpreter_T){
|
||||
if(interpreter.isPaused === false){
|
||||
interpreter.isPaused = true;
|
||||
}
|
||||
}
|
||||
|
||||
/** Helper function for `send()`
|
||||
|
||||
Reference in New Issue
Block a user