Default opts to empty array if it's not supplied.

Fixes a NPE on line 33 for a common case.
This commit is contained in:
Par Winzell 2017-10-25 13:24:30 -07:00
parent 91d11c88b7
commit b1076fa373
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ const binaries = {
* @return Promise<string> a promise that yields the full path to the converted * @return Promise<string> a promise that yields the full path to the converted
* file, an error on conversion failure. * file, an error on conversion failure.
*/ */
function convert(srcFile, destFile, opts) { function convert(srcFile, destFile, opts = []) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
let tool = path.join(__dirname, 'bin', os.type(), 'FBX2glTF'); let tool = path.join(__dirname, 'bin', os.type(), 'FBX2glTF');