From b1076fa373cd6ce5e3f54d223a31d9b6fabe03e1 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Wed, 25 Oct 2017 13:24:30 -0700 Subject: [PATCH] Default opts to empty array if it's not supplied. Fixes a NPE on line 33 for a common case. --- npm/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/index.js b/npm/index.js index 96d17f8..c570984 100644 --- a/npm/index.js +++ b/npm/index.js @@ -19,7 +19,7 @@ const binaries = { * @return Promise a promise that yields the full path to the converted * file, an error on conversion failure. */ -function convert(srcFile, destFile, opts) { +function convert(srcFile, destFile, opts = []) { return new Promise((resolve, reject) => { try { let tool = path.join(__dirname, 'bin', os.type(), 'FBX2glTF');