Skip to content

Commit

Permalink
Update utils.js (#2981)
Browse files Browse the repository at this point in the history
Fixed following error

    ReferenceError: TextEncoder is not defined
  • Loading branch information
sudarshanvn committed May 19, 2023
1 parent 14b840e commit 522e2dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pg/lib/crypto/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

const { TextEncoder, TextDecoder } = require('util');
const useLegacyCrypto = parseInt(process.versions && process.versions.node && process.versions.node.split('.')[0]) < 15
if (useLegacyCrypto) {
// We are on an old version of Node.js that requires legacy crypto utilities.
Expand Down

1 comment on commit 522e2dc

@sudarshanvn

This comment was marked as duplicate.

Please sign in to comment.