Merge pull request #2790 from mempool/nymkappa/bugfix/sql-query

Handle ISP with no nodes
This commit is contained in:
softsimon 2022-12-07 17:40:36 +04:00 committed by GitHub
commit 07987ff4b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -538,6 +538,10 @@ class NodesApi {
const IPSIds = ISPId.split(',');
const [rows]: any = await DB.query(query, [IPSIds, IPSIds]);
if (!rows || rows.length === 0) {
return [];
}
const nodes = {};
const intISPIds: number[] = [];