add default value.
This commit is contained in:
parent
0f00fc8332
commit
3b0edf0d27
|
@ -44,6 +44,8 @@
|
||||||
let nexts=resolve;
|
let nexts=resolve;
|
||||||
let throws=reject;
|
let throws=reject;
|
||||||
if(gnc.is.coroutine(gen)||(gnc.is.generator(gen)&&!gnc.nocoroutine)) {
|
if(gnc.is.coroutine(gen)||(gnc.is.generator(gen)&&!gnc.nocoroutine)) {
|
||||||
|
if(!gen.status)gen.status="next";
|
||||||
|
if(!gen.state)gen.state=undefined;
|
||||||
try{
|
try{
|
||||||
result=gen[result.status](result.state);
|
result=gen[result.status](result.state);
|
||||||
}catch(error){
|
}catch(error){
|
||||||
|
|
Loading…
Reference in New Issue