Skip to content

Commit

Permalink
Add param support
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan770 committed Jun 8, 2018
1 parent d375bcc commit fde1f93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,11 @@
for (let f of e.dataTransfer.files) {
if(f.path.slice((f.path.lastIndexOf(".") - 1 >>> 0) + 2) === "psql"){
if(f.size < 2048){
if(typeof JSON.parse(fs.readFileSync(f.path).toString()).main === "undefined"){
appendLog("'main' empty", "SCRIPT")
if(typeof JSON.parse(fs.readFileSync(f.path).toString()).main === "undefined" || typeof JSON.parse(fs.readFileSync(f.path).toString()).param === "undefined"){
appendLog("'main' or 'param' empty", "SCRIPT")
} else {
cmd.value = JSON.parse(fs.readFileSync(f.path).toString()).main
paraminput.value = JSON.parse(fs.readFileSync(f.path).toString()).param
detect()
}
} else {
Expand Down

0 comments on commit fde1f93

Please sign in to comment.