Skip to content

Commit

Permalink
Ensure unmanaged (undefined) statements like insert don't break the p…
Browse files Browse the repository at this point in the history
…arsing or the RE process (#49)
  • Loading branch information
bigorn0 authored Feb 5, 2025
1 parent 536c244 commit 19ee579
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reverse_engineering/helpers/parserHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ const parseN1qlStatements = ({ statements }) => {
* @returns {ParsedResult}
*/
const mapParsedResult = ({ result, statements }) => {
const scopes = result.flatMap(({ scopes }) => scopes);
const collections = result.flatMap(({ collections }) => collections);
const scopes = result.flatMap(({ scopes }) => scopes).filter(Boolean);
const collections = result.flatMap(({ collections }) => collections).filter(Boolean);
const indexes = result.flatMap(({ indexes }) => indexes);

return {
scopes,
collections,
indexes: mapIndexes({ indexes, statements }),
indexes: mapIndexes({ indexes, statements }).filter(Boolean),
};
};

Expand Down

0 comments on commit 19ee579

Please sign in to comment.