Skip to content

Commit 1313d3b

Browse files
committed
Fix promise for node 10
1 parent f0f2e2e commit 1313d3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/postgresql.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ var ParameterizedSQL = SqlConnector.ParameterizedSQL;
1515
var util = require('util');
1616
var debug = require('debug')('loopback:connector:postgresql');
1717

18+
// Add support for node 0.10.x
19+
if (typeof Promise == 'undefined') {
20+
global.Promise = require('promise');
21+
}
22+
1823
/**
1924
*
2025
* Initialize the PostgreSQL connector against the given data source

0 commit comments

Comments
 (0)