Merge pull request #10 from GianlucaCesari/master

fix(pr): fixed "messy" if statement
This commit is contained in:
Vladimir Carrer 2018-12-05 18:25:02 +01:00 committed by GitHub
commit a0e425353a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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