From 990e03e3dabea0bb13bfecf6df6bc5f5b7613303 Mon Sep 17 00:00:00 2001 From: Vadim Makishvili Date: Fri, 16 Jun 2017 12:00:38 +0300 Subject: [PATCH] Fixed: Cannot read property 'encode' of undefined during executing writeFile() --- lib/Repository.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Repository.js b/lib/Repository.js index d338b261..07a1c280 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -713,6 +713,7 @@ class Repository extends Requestable { * @return {Promise} - the promise for the http request */ writeFile(branch, path, content, message, options, cb) { + options = options || {}; if (typeof options === 'function') { cb = options; options = {};