Fix null dereferencing issue. Fix sensor mode changed not clearing cached control.
This commit is contained in:
1 parent
81bfca4ed6
commit
3c4c38eb59
3 files changed
+13
-3
No files matched your search
@@ -94,6 +94,7 @@ namespace sensors {
|
||||
}
|
||||
|
||||
_update(prev: number, curr: number) {
|
||||
if (curr == null) return;
|
||||
if (this.mode == ColorSensorMode.Color)
|
||||
control.raiseEvent(this._id, this._colorEventValue(curr));
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user