Need to bind intval this to callback within promise.
This commit is contained in:
parent
5b0d120275
commit
eed8905f29
|
@ -454,7 +454,7 @@ class Intval {
|
|||
this._storeState();
|
||||
return resolve();
|
||||
};
|
||||
});
|
||||
}.bind(this));
|
||||
}
|
||||
else {
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -463,7 +463,7 @@ class Intval {
|
|||
this._storeState();
|
||||
return resolve();
|
||||
};
|
||||
});
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -532,7 +532,7 @@ export default class Intval {
|
|||
this._storeState()
|
||||
return resolve()
|
||||
}
|
||||
})
|
||||
}.bind(this))
|
||||
} else {
|
||||
return new Promise (function (resolve, reject) {
|
||||
this._state.frame.cb = (len : number) => {
|
||||
|
@ -540,7 +540,7 @@ export default class Intval {
|
|||
this._storeState()
|
||||
return resolve()
|
||||
}
|
||||
})
|
||||
}.bind(this))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue