Add guard code in locationsAt, for testing entities with invalid loc

This commit is contained in:
Bryan Housel
2021-03-23 14:24:01 -04:00
parent ec787f81ad
commit 9537911b68
+1 -1
View File
@@ -239,7 +239,7 @@ export function coreLocations() {
//
_this.locationsAt = (loc) => {
let result = {};
_wp(loc, true).forEach(prop => result[prop.id] = prop.area);
(_wp(loc, true) || []).forEach(prop => result[prop.id] = prop.area);
return result;
};