From 97145847eff09aae678924c2881d5ca5e246bc8b Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Mon, 4 Mar 2019 12:00:04 +0000 Subject: [PATCH] Merge pull request #1574 from sharelatex/sk-ignore-external-updates-from-gitbridge When a document is updated externally via git-bridge, don't show warning GitOrigin-RevId: bede2fa0c555a597ac40e8680ff30a51da0ab429 --- services/web/public/src/ide/editor/EditorManager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/web/public/src/ide/editor/EditorManager.js b/services/web/public/src/ide/editor/EditorManager.js index de7e9e6964..aacff7b1ca 100644 --- a/services/web/public/src/ide/editor/EditorManager.js +++ b/services/web/public/src/ide/editor/EditorManager.js @@ -236,6 +236,12 @@ define([ if (this._ignoreExternalUpdates) { return } + if ( + _.property(['meta', 'type'])(update) === 'external' && + _.property(['meta', 'source'])(update) === 'git-bridge' + ) { + return + } return this.ide.showGenericMessageModal( 'Document Updated Externally', 'This document was just updated externally. Any recent changes you have made may have been overwritten. To see previous versions please look in the history.'