mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Clean up detection of color any
This commit is contained in:
parent
c25b84d510
commit
d77944beff
1 changed files with 4 additions and 3 deletions
|
@ -1943,10 +1943,11 @@ class Scratch3BoostBlocks {
|
||||||
_isColor (colorId) {
|
_isColor (colorId) {
|
||||||
switch (colorId) {
|
switch (colorId) {
|
||||||
case COLOR_ID_ANY:
|
case COLOR_ID_ANY:
|
||||||
if (this._peripheral.color === this._peripheral.previousColor) {
|
if (this._peripheral.color !== COLOR_ID_NONE &&
|
||||||
return false;
|
this._peripheral.color !== this._peripheral.previousColor) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
default:
|
default:
|
||||||
return colorId === this._peripheral.color;
|
return colorId === this._peripheral.color;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue