Permalink
Browse files

fix error with `getFile()`

  • Loading branch information...
1 parent f7b843a commit 2218014f988883e8436eba7480ba0e9a25e3f616 @fent fent committed Apr 3, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/dropbox-node.js
View
@@ -132,6 +132,7 @@ DropboxClient.prototype.createAccount = function(email, first_name, last_name
// user's Dropbox root.
DropboxClient.prototype.getFile = function(path, optargs, cb) {
if (typeof optargs == 'function') cb = optargs, optargs = {};
+ else if (!optargs) optargs = {};
var uri = CONTENT_API_URI + '/files/dropbox/' + escapePath(path) +
(optargs.rev ? '?rev=' + optargs.rev : '');
return this.get(uri, optargs, optargs.range, cb);

0 comments on commit 2218014

Please sign in to comment.