You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(`Cannot transition from ${from} to unknown state: ${state}`);
}
d._create=function(current,states){
if(!(currentinstates)){
thrownewError(`Initial state [${current}] is not a known state.`);
}
for(letpinstates){
letstate=states[p];
for(let[,candidates]ofstate.transitions){
for(let{to}ofcandidates){
if(!(toinstates)){
unknownState(p,to);
}
}
}
if(invokePromiseType.isPrototypeOf(state)){
lethasErrorFrom=false;
for(let[,candidates]ofstate.transitions){
for(let{from}ofcandidates){
if(from==='error')hasErrorFrom=true;
}
}
if(!hasErrorFrom){
console.warn(
`When using invoke [current state: ${p}] with Promise-returning function, you need to add 'error' state. Otherwise, robot will hide errors in Promise-returning function`
);
}
}
}
};
d._send=function(eventName,currentStateName){
thrownewError(`No transitions for event ${eventName} from the current state [${currentStateName}]`);