repo: janusweb action: commit revision: path_from: revision_from: fb695e83014e722fe74d0de635054523a9d83792: path_to: revision_to:
commit fb695e83014e722fe74d0de635054523a9d83792 Author: James BaicoianuDate: 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
--- 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-----