fix(pr): fixed "messy" if statement

This commit is contained in:
Gianluca Cesari 2018-12-05 18:05:07 +01:00
parent b0c19402fa
commit 20a071e603

View file

@ -20,10 +20,7 @@ program
if (program.url) urlvalue = program.url if (program.url) urlvalue = program.url
else process.exit(console.log("Please add --url parameter. Something like this: $ screenshoteer --url http:www.example.com")); else process.exit(console.log("Please add --url parameter. Something like this: $ screenshoteer --url http:www.example.com"));
!program.fullpage ? fullPage = true : fullPage = JSON.parse(program.fullpage);
if (program.fullpage && program.fullpage == "true") fullPage = true
if (program.fullpage && program.fullpage == "false") fullPage = false
else fullPage = true;
console.log(urlvalue); console.log(urlvalue);
console.log(fullPage); console.log(fullPage);