mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-10 15:02:06 -05:00
Merge pull request #41 from tmickel/bugfix/39
Resolve existing motor timeout (instead of reject)
This commit is contained in:
commit
b30ee492be
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