Cope with schema not being detected

This commit is contained in:
D. Berge
2022-05-12 23:04:07 +02:00
parent 15c56d3f64
commit e19601218a

View File

@@ -107,7 +107,7 @@ async function getNearestOfflinePreplot (candidates) {
}
}
client.release();
const _schema = results.sort( (a, b) => a.distance - b.distance).shift()._schema;
const _schema = results.sort( (a, b) => a.distance - b.distance).shift()?._schema;
return candidates.find(c => c._schema == _schema);
}