Skip to content

Commit

Permalink
Merge pull request #66 from decentryfi/fix_65
Browse files Browse the repository at this point in the history
fix(65): string.replaceAll with string.replace
  • Loading branch information
honeymaro authored Jan 30, 2022
2 parents d3397e9 + b7e7024 commit a7ec865
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/graphql/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ export default (queries: Query[]) => gql`
}
`

export const stringify = (msg: object) =>
JSON.stringify(msg).replaceAll('"', '\\"')
export const stringify = (msg: object) => {
const stringify = JSON.stringify(msg)
return stringify.replace(/"/g, '\\"')
}

0 comments on commit a7ec865

Please sign in to comment.