loleaflet/src/core/Socket.js |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 39c778e0cf4e37b5621a06798cd5147604505bc5
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Jul 23 19:33:02 2020 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Aug 28 08:37:14 2020 +0200

    loleaflet: fix the "vex" dialog that throw an uncaught type error
    
    This happens when a dialog related to saving a document conflict
    
    Change-Id: I37c4840ef09f421a16c0313891b75a61be9c881d
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99342
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    (cherry picked from commit e98459439e405896bc7f36178bbaf07c40033bbc)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101461
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index a5f8ee5ed..95588578e 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -550,6 +550,7 @@ L.Socket = L.Class.extend({
                        }
                        else if (command.errorKind === 'documentconflict')
                        {
+                               var that = this;
                                storageError = 
errorMessages.storage.documentconflict;
 
                                vex.closeAll();
@@ -578,15 +579,15 @@ L.Socket = L.Class.extend({
                                        callback: function(value) {
                                                if (value === 'discard') {
                                                        // They want to refresh 
the page and load document again for all
-                                                       
this.sendMessage('closedocument');
+                                                       
that.sendMessage('closedocument');
                                                } else if (value === 
'overwrite') {
                                                        // They want to 
overwrite
-                                                       
this.sendMessage('savetostorage force=1');
+                                                       
that.sendMessage('savetostorage force=1');
                                                } else if (value === 'saveas') {
-                                                       var filename = 
this._map['wopi'].BaseFileName;
+                                                       var filename = 
that._map['wopi'].BaseFileName;
                                                        if (filename) {
                                                                filename = 
L.LOUtil.generateNewFileName(filename, '_new');
-                                                               
this._map.saveAs(filename);
+                                                               
that._map.saveAs(filename);
                                                        }
                                                }
                                        },
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to