From fa62ae511e7dbe30ec60ddb5c823f2b23ca81648 Mon Sep 17 00:00:00 2001 From: Jordan Watkins Date: Sat, 20 Oct 2018 14:13:28 -0700 Subject: [PATCH] Fix to avoid double extension when using the dest argument --- cli/export-png.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/export-png.js b/cli/export-png.js index 64f45c9..fef7c2e 100644 --- a/cli/export-png.js +++ b/cli/export-png.js @@ -105,7 +105,7 @@ function onPageExit(page, options, data) { console.log("\n" + 'Generated file(s):'); - const dest = options.dest + '.png'; + const dest = options.dest.replace('.png', '') + '.png'; // Render page to the output image page.render(dest);