Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bcamper committed Dec 5, 2020
1 parent 5f35627 commit 990d260
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions src/scene/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ const GLOBAL_REGISTRY = '__global_prop';

// Property name references a global property?
export function isGlobalReference (val) {
if (val && val.slice(0, GLOBAL_PREFIX_LENGTH) === GLOBAL_PREFIX) {
return true;
}
return false;
return val?.slice(0, GLOBAL_PREFIX_LENGTH) === GLOBAL_PREFIX;
}

// Has object property been substitued with a value from a global reference?
Expand Down
1 change: 0 additions & 1 deletion src/scene/scene_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ const SceneLoader = {
if (typeof curValue === 'string' && config.textures[curValue] == null) {
if (isGlobalSubstitution(config, path)) {
// global substituions are resolved against the base scene path, not the import they came from
// const url = curValue;
const url = base_bundle.urlFor(curValue);
config.textures[curValue] = { url };
}
Expand Down

0 comments on commit 990d260

Please sign in to comment.