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) {
|
||||
this._state.frame.cb = (len) => {
|
||||
this._state.counter++;
|
||||
this._storeState();
|
||||
};
|
||||
return new Promise(function (resolve, reject) {
|
||||
this._state.frame.cb = (len) => {
|
||||
this._state.counter++;
|
||||
this._storeState();
|
||||
return resolve();
|
||||
};
|
||||
});
|
||||
}
|
||||
else {
|
||||
this._state.frame.cb = (len) => {
|
||||
this._state.counter--;
|
||||
this._storeState();
|
||||
};
|
||||
return new Promise(function (resolve, reject) {
|
||||
this._state.frame.cb = (len) => {
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
if (dir) {
|
||||
this._state.frame.cb = (len : number) => {
|
||||
this._state.counter++;
|
||||
this._storeState();
|
||||
}
|
||||
return new Promise (function (resolve, reject) {
|
||||
this._state.frame.cb = (len : number) => {
|
||||
this._state.counter++
|
||||
this._storeState()
|
||||
return resolve()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this._state.frame.cb = (len : number) => {
|
||||
this._state.counter--;
|
||||
this._storeState();
|
||||
}
|
||||
return new Promise (function (resolve, reject) {
|
||||
this._state.frame.cb = (len : number) => {
|
||||
this._state.counter--
|
||||
this._storeState()
|
||||
return resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue