Skip to content

Commit

Permalink
[E4E-87]: Remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCleric committed Jan 19, 2022
1 parent 6d80ab3 commit 24f8f5b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/useRestQuery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ function stripOptionals(gqlQuery: string, variables?: Record<string, unknown>):
const args = Array.from(gqlQuery.matchAll(/{args.([^}]*)}/g)).map(m => m[1]);
let renderedGql = gqlQuery;

console.log({ args, renderedGql });
args.forEach(arg => {
console.log({ arg, variables });
if (!variables || !(arg in variables) || variables[arg] === undefined) {
// eslint-disable-next-line security/detect-non-literal-regexp
renderedGql = renderedGql.replace(new RegExp(`${arg}={args.${arg}}`, 'g'), '');
Expand Down

0 comments on commit 24f8f5b

Please sign in to comment.