prevent reading property 'collides' of undefined
fixes e2e tests
This commit is contained in:
parent
ae46a1faf1
commit
ae8c18fa4b
@ -336,7 +336,9 @@ export class GameMap {
|
||||
if (!layer.visible) {
|
||||
continue;
|
||||
}
|
||||
if (layer.getTileAt(x, y)?.properties[GameMapProperties.COLLIDES]) {
|
||||
// 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]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user