Merge pull request #12403 from 1P-Cusack/EntityPropertiesJS_801_on_split

[EntityPropertiesJS] Fix for 801 Uncaught TypeError (details below).
This commit is contained in:
Sam Gondelman 2018-02-15 09:34:59 -08:00 committed by GitHub
commit 09645c8b48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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