Merge pull request #6984 from huffman/fix-edit-import-cancel

Fix 'Import Entities' causing error when cancelling
This commit is contained in:
Seth Alves 2016-02-01 07:04:36 -08:00
commit 6927f9f503

View file

@ -1277,9 +1277,12 @@ function handeMenuEvent(menuItem) {
}
} else if (menuItem == "Import Entities" || menuItem == "Import Entities from URL") {
var importURL;
var importURL = null;
if (menuItem == "Import Entities") {
importURL = "file:///" + Window.browse("Select models to import", "", "*.json");
var fullPath = Window.browse("Select models to import", "", "*.json");
if (fullPath) {
importURL = "file:///" + fullPath;
}
} else {
importURL = Window.prompt("URL of SVO to import", "");
}