mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Resolve existing motor timeout (instead of reject)
This commit is contained in:
parent
c37cf3fe85
commit
4d4682912d
3 changed files with 3 additions and 3 deletions
|
@ -61,7 +61,7 @@ WeDo2Blocks.prototype._clamp = function(val, min, max) {
|
|||
WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
|
||||
if (this._motorTimeout > 0) {
|
||||
// @todo maybe this should go through util
|
||||
YieldTimers.reject(this._motorTimeout);
|
||||
YieldTimers.resolve(this._motorTimeout);
|
||||
this._motorTimeout = null;
|
||||
}
|
||||
if (window.native) {
|
||||
|
|
2
vm.js
2
vm.js
|
@ -2175,7 +2175,7 @@
|
|||
WeDo2Blocks.prototype._motorOnFor = function(direction, durationSeconds, util) {
|
||||
if (this._motorTimeout > 0) {
|
||||
// @todo maybe this should go through util
|
||||
YieldTimers.reject(this._motorTimeout);
|
||||
YieldTimers.resolve(this._motorTimeout);
|
||||
this._motorTimeout = null;
|
||||
}
|
||||
if (window.native) {
|
||||
|
|
2
vm.min.js
vendored
2
vm.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue