Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ng-providers/loadingManagerProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ angular.module('atlasDemo').provider('loadingManager', ['mainAppProvider', 'volu

var objStructures = atlasStructure.Structure.filter(item => {
if (Array.isArray(item.sourceSelector)) {
return item.sourceSelector.some(selector => /\.obj$/.test(selector.dataSource.source));
return item.sourceSelector.some(selector => /\.obj$/.test(selector.dataSource));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we want to list structure using ".obj" files so we can load them later using the OBJLoader.
The correction you provide is wrong as dataSource is an object and the regex can not be used on objects.
To account for the presence of the object, the code should be : test(selector.dataSource && selector.dataSource.source)

}
else {
return /\.obj$/.test(item.sourceSelector.dataSource.source);
Expand Down