added comment and fixed standard error

pull/1/head
LianaHus 5 years ago
parent d72ab40103
commit 2bd02ef3db
  1. 7
      src/app/files/file-explorer.js

@ -442,10 +442,15 @@ fileExplorer.prototype.toGist = function (id) {
}
}
/**
* This function is to get the original content of given gist
* @params id is the gist id to fetch
*/
async function getOriginalFiles (id) {
if (!id) {
return []
}
const url = `https://api.github.com/gists/${id}`
const res = await fetch(url)
const data = await res.json()
@ -469,7 +474,7 @@ fileExplorer.prototype.toGist = function (id) {
const gists = new Gists({ token: tokenAccess })
if (id) {
let originalFileList = getOriginalFiles(id)
const originalFileList = getOriginalFiles(id)
// Telling the GIST API to remove files
const updatedFileList = Object.keys(packaged)
const allItems = Object.keys(originalFileList)

Loading…
Cancel
Save