Fix 'Import Entities' causing error when cancelling

This commit is contained in:
Ryan Huffman 2016-01-29 14:12:27 -08:00
parent 6db8239d8a
commit 9a2af26906

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", "");
}