Skip to content

Commit

Permalink
(fix) don't crash if no matches are found
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Mar 13, 2021
1 parent 89f6353 commit 24582bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/src/generic/memory.ts
Expand Up @@ -40,6 +40,10 @@ export namespace memory {
});
}).filter((m) => m.length !== 0);

if (addresses.length <= 0) {
return [];
}

return addresses.reduce((a, b) => a.concat(b));
};

Expand Down

0 comments on commit 24582bb

Please sign in to comment.