From bf4f5fd973a624325f420564652f58988be0e916 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Thu, 22 Jul 2021 19:42:28 -0400 Subject: [PATCH] Fix coerce usage --- bin/obj2gltf.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/obj2gltf.js b/bin/obj2gltf.js index 40ffe76..1ca3f42 100644 --- a/bin/obj2gltf.js +++ b/bin/obj2gltf.js @@ -25,6 +25,9 @@ const argv = yargs type : 'string', demandOption : true, coerce : function (p) { + if (!defined(p)) { + return undefined; + } if (p.length === 0) { throw new Error('Input path must be a file name'); } @@ -36,6 +39,9 @@ const argv = yargs describe : 'Path of the converted glTF or glb file.', type : 'string', coerce : function (p) { + if (!defined(p)) { + return undefined; + } if (p.length === 0) { throw new Error('Output path must be a file name'); }