repo: janusweb
action: commit
revision: 
path_from: 
revision_from: fb695e83014e722fe74d0de635054523a9d83792:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit fb695e83014e722fe74d0de635054523a9d83792
Author: James Baicoianu 
Date:   Fri Jun 12 15:02:29 2020 -0700

    Fetch asset from default assetpack if object isn't in the room hierarchy

diff --git a/scripts/janusbase.js b/scripts/janusbase.js
index 0710aede54eac9599d17a16dd4d4ec8dc496c455..
index ..07833f1f978f10494917dad5bd8e67d0a16466d4 100644
--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -481,6 +481,10 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
       if (!asset && parent && typeof parent.getAsset == 'function') {
         asset = parent.getAsset(type, id);
       }
+      if (!asset && parent !== janus._target) {
+        // Asset not found in object hierarchy, check the built-in assets
+        asset = janus.getAsset(type, id);
+      }
       if (!asset && autocreate) {
         // Asset definition wasn't found, so we'll assume it's a URL and define a new asset
         let assetargs = {id: id, src: id};

-----END OF PAGE-----