Catch JS error "this.getVersion(...) is undefined" (Fixes #2048)

This commit is contained in:
Emanuel Schuetze 2016-03-20 20:30:24 +01:00
parent bf8e4fa585
commit 85ffe4d8fa

View File

@ -132,7 +132,7 @@ angular.module('OpenSlidesApp.motions', ['OpenSlidesApp.users'])
return element.id == versionId; return element.id == versionId;
}); });
} }
return this.versions[index]; return this.versions[index] || {};
}, },
getTitle: function (versionId) { getTitle: function (versionId) {
return this.getVersion(versionId).title; return this.getVersion(versionId).title;