mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Bugfix: safe call of .hasOwnProperty(...)
This commit is contained in:
parent
c126ba1c7c
commit
e9cb2965e9
@ -52,7 +52,8 @@ PG.prototype.cancel = function(config, client, query) {
|
||||
cancellingClient.cancel(client, query);
|
||||
};
|
||||
|
||||
if (process.env.hasOwnProperty('NODE_PG_FORCE_NATIVE')) {
|
||||
var forceNative = Object.prototype.hasOwnProperty.call(process.env, 'NODE_PG_FORCE_NATIVE');
|
||||
if (forceNative) {
|
||||
module.exports = new PG(require(__dirname + '/native'));
|
||||
} else {
|
||||
module.exports = new PG(Client);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user