From 1ba7be01793fa6ac6d35704ac2edeb127ca794f8 Mon Sep 17 00:00:00 2001 From: Brian White Date: Wed, 13 Aug 2014 08:39:51 -0400 Subject: [PATCH] Connection: change argument check --- lib/Connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Connection.js b/lib/Connection.js index 39db5f0..3f03685 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -379,7 +379,7 @@ Connection.prototype.openBox = function(name, readOnly, cb) { if (this.state !== 'authenticated') throw new Error('Not authenticated'); - if (cb === undefined) { + if (typeof readOnly === 'function') { cb = readOnly; readOnly = false; }