mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Update utils.js (#2981)
Fixed following error
ReferenceError: TextEncoder is not defined
This commit is contained in:
parent
14b840e96e
commit
522e2dcb76
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user