From 91d96379f5ea1825942c9f0460d73e01f86007ea Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 3 Apr 2019 10:38:07 +0200 Subject: [PATCH] fixed publish to gist for empty file --- src/app/files/file-explorer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index cafe2efb1c..bcb15b96f2 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -429,7 +429,7 @@ fileExplorer.prototype.packageFiles = function (filesProvider, callback) { else { async.eachSeries(Object.keys(files), (path, cb) => { filesProvider.get(path, (error, content) => { - if (/^\s+$/.test(content)) { + if (/^\s+$/.test(content) || !content.length) { content = '// this line is added to create a gist. Empty file is not allowed.' } if (error) cb(error)