Frame must return a promise for sequence to work. For any of it, really.
This commit is contained in:
parent
0f57c1c630
commit
5b0d120275
|
@ -448,16 +448,22 @@ class Intval {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dir) {
|
if (dir) {
|
||||||
this._state.frame.cb = (len) => {
|
return new Promise(function (resolve, reject) {
|
||||||
this._state.counter++;
|
this._state.frame.cb = (len) => {
|
||||||
this._storeState();
|
this._state.counter++;
|
||||||
};
|
this._storeState();
|
||||||
|
return resolve();
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this._state.frame.cb = (len) => {
|
return new Promise(function (resolve, reject) {
|
||||||
this._state.counter--;
|
this._state.frame.cb = (len) => {
|
||||||
this._storeState();
|
this._state.counter--;
|
||||||
};
|
this._storeState();
|
||||||
|
return resolve();
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -524,16 +524,23 @@ export default class Intval {
|
||||||
this._startBwd()
|
this._startBwd()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dir) {
|
if (dir) {
|
||||||
this._state.frame.cb = (len : number) => {
|
return new Promise (function (resolve, reject) {
|
||||||
this._state.counter++;
|
this._state.frame.cb = (len : number) => {
|
||||||
this._storeState();
|
this._state.counter++
|
||||||
}
|
this._storeState()
|
||||||
|
return resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this._state.frame.cb = (len : number) => {
|
return new Promise (function (resolve, reject) {
|
||||||
this._state.counter--;
|
this._state.frame.cb = (len : number) => {
|
||||||
this._storeState();
|
this._state.counter--
|
||||||
}
|
this._storeState()
|
||||||
|
return resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue