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

New commits:
commit e98459439e405896bc7f36178bbaf07c40033bbc
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Jul 23 19:33:02 2020 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Fri Jul 24 03:03:44 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>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 08e82af1c..33f73f6fc 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -544,6 +544,7 @@ L.Socket = L.Class.extend({
                        }
                        else if (command.errorKind === 'documentconflict')
                        {
+                               var that = this;
                                storageError = 
errorMessages.storage.documentconflict;
 
                                vex.closeAll();
@@ -572,15 +573,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