Skip to content

Commit 5bf6394

Browse files
authored
Merge pull request #155 from xeokit/make-configs-optional
Make convert2xkt configs optional
2 parents efb4a07 + 592e6b9 commit 5bf6394

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/convert2xkt.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const path = require("path");
7474
*/
7575
function convert2xkt({
7676
WebIFC,
77-
configs,
77+
configs = {},
7878
source,
7979
sourceData,
8080
sourceFormat,
@@ -121,11 +121,11 @@ function convert2xkt({
121121
stats.aabb = null;
122122

123123
function getFileExtension(fileName) {
124-
let ext = path.extname(fileName);
125-
if (ext.charAt(0) === ".") {
126-
ext = ext.substring(1);
127-
}
128-
return ext;
124+
let ext = path.extname(fileName);
125+
if (ext.charAt(0) === ".") {
126+
ext = ext.substring(1);
127+
}
128+
return ext;
129129
}
130130

131131
return new Promise(function (resolve, reject) {
@@ -166,6 +166,7 @@ function convert2xkt({
166166
log(`[WARNING] Could not find configs sourceConfigs entry for source format "${ext}". This is derived from the source file name extension. Will use internal default configs.`);
167167
fileTypeConfigs = {};
168168
}
169+
169170
function overrideOption(option1, option2) {
170171
if (option1 !== undefined) {
171172
return option1;

0 commit comments

Comments
 (0)