diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js index b7a5b39df..18640494f 100644 --- a/apps/common/main/lib/controller/History.js +++ b/apps/common/main/lib/controller/History.js @@ -163,19 +163,27 @@ define([ if (historyStore && data!==null) { var rev, revisions = historyStore.findRevisions(data.version), urlGetTime = new Date(); - var diff = opts.data.urlDiff || opts.data.changesUrl; + var diff = opts.data.changesUrl, + url = (!_.isEmpty(diff) && opts.data.previous) ? opts.data.previous.url : opts.data.url, + docId = opts.data.key ? opts.data.key : this.currentDocId, + docIdPrev = opts.data.previous && opts.data.previous.key ? opts.data.previous.key : this.currentDocIdPrev; + if (revisions && revisions.length>0) { for(var i=0; i