fixed publish to gist for empty file

pull/1/head
LianaHus 6 years ago
parent 416d7906e9
commit 91d96379f5
  1. 2
      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)

Loading…
Cancel
Save