Skip to content

Commit

Permalink
Merge pull request #155 from xeokit/make-configs-optional
Browse files Browse the repository at this point in the history
Make convert2xkt configs optional
  • Loading branch information
xeolabs authored May 6, 2024
2 parents efb4a07 + 592e6b9 commit 5bf6394
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/convert2xkt.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const path = require("path");
*/
function convert2xkt({
WebIFC,
configs,
configs = {},
source,
sourceData,
sourceFormat,
Expand Down Expand Up @@ -121,11 +121,11 @@ function convert2xkt({
stats.aabb = null;

function getFileExtension(fileName) {
let ext = path.extname(fileName);
if (ext.charAt(0) === ".") {
ext = ext.substring(1);
}
return ext;
let ext = path.extname(fileName);
if (ext.charAt(0) === ".") {
ext = ext.substring(1);
}
return ext;
}

return new Promise(function (resolve, reject) {
Expand Down Expand Up @@ -166,6 +166,7 @@ function convert2xkt({
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.`);
fileTypeConfigs = {};
}

function overrideOption(option1, option2) {
if (option1 !== undefined) {
return option1;
Expand Down

0 comments on commit 5bf6394

Please sign in to comment.