feat: genContent may throw the step-like info.
This commit is contained in:
parent
a41ccbdc1a
commit
933a91f9d0
16
game/game.js
16
game/game.js
|
@ -11595,12 +11595,16 @@
|
|||
result:result
|
||||
});
|
||||
var res=gen.next((lastEvent&&("result" in lastEvent))?lastEvent.result:null);
|
||||
if(res.done) event.finish();
|
||||
else {
|
||||
var currentResult=res.value;
|
||||
// TODO: use `event.debugger` to replace source
|
||||
if(typeof currentResult=="function") yield currentResult;
|
||||
else lastEvent=currentResult;
|
||||
if(res.done) return event.finish();
|
||||
var currentResult=res.value;
|
||||
// TODO: use `event.debugger` to replace source
|
||||
if(typeof currentResult=="function") yield currentResult;
|
||||
else{
|
||||
if(Array.isArray(currentResult)){
|
||||
event.step=currentResult[1];
|
||||
currentResult=currentResult[0];
|
||||
}
|
||||
lastEvent=currentResult;
|
||||
}
|
||||
}
|
||||
}else if(item._parsed) return item;
|
||||
|
|
Loading…
Reference in New Issue