Commit 32d93ab3 authored by Patrick Müller's avatar Patrick Müller

fix: Projects Panel -> open first project if only one project exists

parent 99ea611e
......@@ -355,8 +355,19 @@ define('controls/projects/project/Panel', [
self.Loader.show();
Projects.getList(function (result) {
if (Object.getLength(result)) {
for (var key in result) {
var key;
if (Object.getLength(result) === 1) {
key = Object.keys(result)[0];
self.setAttribute('project', key);
self.setAttribute('lang', result[key].default_lang);
self.openProject();
self.Loader.hide();
return;
} else if (Object.getLength(result)) {
for (key in result) {
if (!result.hasOwnProperty(key)) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment