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