use optional chaining
This commit is contained in:
parent
e8d5335bc0
commit
3ee9b26650
@ -348,9 +348,7 @@ export class GameMap {
|
|||||||
if (!layer.visible) {
|
if (!layer.visible) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// TODO: use optional chaining when https://github.com/DevExpress/testcafe-hammerhead/issues/2714 is fixed
|
if (layer.getTileAt(x, y)?.properties?.[GameMapProperties.COLLIDES]) {
|
||||||
const properties = layer.getTileAt(x, y)?.properties;
|
|
||||||
if (properties && properties[GameMapProperties.COLLIDES]) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user