pass empty result to updateAnnotation to handle invalid entity input

This commit is contained in:
j 2015-02-06 15:11:57 +05:30
parent ad8db3a293
commit ef3a7b720f

View file

@ -149,6 +149,7 @@ pandora.ui.editor = function(data) {
Ox.Log('', 'editAnnotation', data);
function callback(result) {
Ox.Log('', 'editAnnotation result', result);
if (!Ox.isEmpty(result.data)) {
result.data.date = Ox.formatDate(
result.data.modified.slice(0, 10), '%B %e, %Y'
);
@ -157,6 +158,7 @@ pandora.ui.editor = function(data) {
).map(function(language) {
return Ox.getLanguageNameByCode(language);
});
}
that.updateAnnotation(data.id, result.data);
Ox.Request.clearCache();
};