Skip to content

Commit

Permalink
Update building.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Beakerboy authored Mar 26, 2024
1 parent 376dc65 commit ecc490e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,14 @@ class Building {
// todo: multipolygon inner and outer roles.
let parts = xmlData.querySelectorAll('member[role="part"]');
var ref = 0;
window.printError('Parts: ' + parts.length);
for (let i = 0; i < parts.length; i++) {
ref = parts[i].getAttribute('ref');
const part = this.fullXmlData.getElementById(ref);
if (part) {
ways.push(this.fullXmlData.getElementById(ref));
} else {
console.log('Part ' + ref + ' is null.');
window.printError('Part #' + i + '(' + ref + ') is null.');
}
}
} else {
Expand Down

0 comments on commit ecc490e

Please sign in to comment.