Merge branch 'code-authorcolors-PR' of https://github.com/stoppegp/cryptpad into stoppegp-code-authorcolors-PR
This commit is contained in:
commit
ee3adccafc
2 files changed
+118
-5
No files matched your search
@@ -419,12 +419,12 @@ define([
|
||||
|
||||
|
||||
|
||||
exp.contentUpdate = function (newContent) {
|
||||
exp.contentUpdate = function (newContent, authormarksUpdate, authormarksLocal) {
|
||||
var oldDoc = canonicalize(editor.getValue());
|
||||
var remoteDoc = newContent.content;
|
||||
// setValueAndCursor triggers onLocal, even if we don't make any change to the content
|
||||
// and it may revert other changes (metadata)
|
||||
if (oldDoc === remoteDoc) { return; }
|
||||
if (oldDoc === remoteDoc && (authormarksUpdate === undefined || authormarksLocal === undefined || JSON.stringify(authormarksUpdate) === JSON.stringify(authormarksLocal))) { return; }
|
||||
exp.setValueAndCursor(oldDoc, remoteDoc);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user