in entity-browser-frontend/app/controller/search.js [64:76]
function syncCtrl() {
var locationTypeId = $location.search().typeId;
var result = null;
if (locationTypeId) {
result = currentDatabase.get().types.find(function (type) {
return type.id === parseInt(locationTypeId);
}) || currentDatabase.get().types[0];
} else {
result = currentDatabase.get().types[0];
}
searchCtrl.selectedType = result;
searchCtrl.searchQuery = $location.search().q;
}