From f16d0573c5294cec4e76e6fcf1e3d035ea5dd900 Mon Sep 17 00:00:00 2001 From: Kelvin Wong Date: Thu, 12 Apr 2012 01:51:55 +0800 Subject: [PATCH] Fix 'undefined is not a function' problem at postgres adapter --- lib/adapters/postgres.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/postgres.js b/lib/adapters/postgres.js index 7cbcacd3..e3f848c0 100644 --- a/lib/adapters/postgres.js +++ b/lib/adapters/postgres.js @@ -46,7 +46,7 @@ PG.prototype.query = function (sql, callback) { var time = Date.now(); var log = this.log; this.client.query(sql, function (err, data) { - log(sql, time); + if (log) log(sql, time); callback(err, data ? data.rows : null); }); };