migrate again

This commit is contained in:
j 2019-02-11 00:25:00 +05:30
parent edbe4da011
commit b181575a37
1 changed files with 8 additions and 3 deletions

View File

@ -93,9 +93,14 @@ oml.ui.viewer = function() {
oml.api.getAnnotations({
id: ui.item
}, function(result) {
console.log(result)
annotations = result.data.annotations
callback && callback(annotations)
if (!result.data.annotations.length && localStorage[oml.user.ui.item + '.annotations_']) {
localStorage[oml.user.ui.item + '.annotations'] = localStorage[oml.user.ui.item + '.annotations_']
loadAnnotations(callback)
} else {
annotations = result.data.annotations
callback && callback(annotations)
}
})
}
}