mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2025-02-18 16:43:52 -05:00
Fix coerce usage
This commit is contained in:
parent
2516510682
commit
bf4f5fd973
@ -25,6 +25,9 @@ const argv = yargs
|
|||||||
type : 'string',
|
type : 'string',
|
||||||
demandOption : true,
|
demandOption : true,
|
||||||
coerce : function (p) {
|
coerce : function (p) {
|
||||||
|
if (!defined(p)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
if (p.length === 0) {
|
if (p.length === 0) {
|
||||||
throw new Error('Input path must be a file name');
|
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.',
|
describe : 'Path of the converted glTF or glb file.',
|
||||||
type : 'string',
|
type : 'string',
|
||||||
coerce : function (p) {
|
coerce : function (p) {
|
||||||
|
if (!defined(p)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
if (p.length === 0) {
|
if (p.length === 0) {
|
||||||
throw new Error('Output path must be a file name');
|
throw new Error('Output path must be a file name');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user