Skip to content

Commit

Permalink
Web: Editor: Fixed getting information of difference of file.
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaLopaeva committed Dec 8, 2021
1 parent e3eb043 commit 5fa436e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions web/ASC.Web.Editor/src/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const Editor = () => {
setIsAuthenticated(successAuth);
}

const config = await openEdit(fileId, version, doc, view);
config = await openEdit(fileId, version, doc, view);

if (
!view &&
Expand Down Expand Up @@ -462,17 +462,17 @@ const Editor = () => {
const onSDKRequestHistoryData = async (event) => {
var version = event.data;
console.log("version", version);
const newConfig = await openEdit(fileId, version, doc);
const prevConfig = await openEdit(fileId, version - 1, doc);
console.log("newConfig", prevConfig);

const diff = await getEditDiff(fileId, version);

docEditor.setHistoryData({
//changesUrl: "https://example.com/url-to-changes.zip",
key: newConfig.document.key,
changesUrl: diff.changesUrl,
key: diff.key,
previous: {
key: prevConfig.document.key,
url: prevConfig.document.url,
key: diff.previous?.key,
url: diff.previous?.url,
},
url: newConfig.document.url,
url: diff.url,
});
};
const onSDKRequestHistoryClose = () => {
Expand Down

0 comments on commit 5fa436e

Please sign in to comment.