fixed publish to gist for empty file

pull/3094/head
LianaHus 6 years ago
parent 633ef1586a
commit 7f162d5f1e
  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