mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-17 00:06:47 +02:00
Simple fix for 801 Uncaught TypeError (details below).
entityProperties.js was throwing out: 801 Uncaught TypeError: Cannot read property 'split' of undefined This moves properties.modelURL related checks behind the property.type validation check to avoid calling the function on an undefined member if the object doesn't have that key defined. Changes Committed: modified: scripts/system/html/js/entityProperties.js
This commit is contained in:
parent
6187731fdc
commit
d466c079a4
1 changed files with 7 additions and 4 deletions
|
@ -798,10 +798,13 @@ function loaded() {
|
|||
|
||||
// HTML workaround since image is not yet a separate entity type
|
||||
var IMAGE_MODEL_NAME = 'default-image-model.fbx';
|
||||
var urlParts = properties.modelURL.split('/')
|
||||
var propsFilename = urlParts[urlParts.length - 1];
|
||||
if (properties.type === "Model" && propsFilename === IMAGE_MODEL_NAME) {
|
||||
properties.type = "Image";
|
||||
if (properties.type === "Model") {
|
||||
var urlParts = properties.modelURL.split('/');
|
||||
var propsFilename = urlParts[urlParts.length - 1];
|
||||
|
||||
if (propsFilename === IMAGE_MODEL_NAME) {
|
||||
properties.type = "Image";
|
||||
}
|
||||
}
|
||||
|
||||
// Create class name for css ruleset filtering
|
||||
|
|
Loading…
Reference in a new issue