[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-1' - loleaflet/src

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 2 08:14:24 UTC 2020


 loleaflet/src/control/Control.PartsPreview.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eef4edf8f6e454e607f4d3bc80af8d31c15e10df
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Mar 19 11:52:54 2020 -0400
Commit:     Aron Budea <aron.budea at collabora.com>
CommitDate: Thu Apr 2 10:13:39 2020 +0200

    loleaflet: check if  "parts" variable is a number of the preview thumbnail
    
    While I was debugging Impress, I received unexpected "undefined"
    value of the variable "parts"
    
    Change-Id: Id8b6737155516fd0d8cfaa350170e9c631c55dcf
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90756
    Tested-by: Henry Castro <hcastro at collabora.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    (cherry picked from commit af338541a88d4f90d1859ba60d8de6e3e90f1423)

diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index c6cd021fb..0dbff5411 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -65,7 +65,7 @@ L.Control.PartsPreview = L.Control.extend({
 		var selectedPart = e.selectedPart;
 		var selectedParts = e.selectedParts;
 		var docType = e.docType;
-		if (docType === 'text') {
+		if (docType === 'text' || isNaN(parts)) {
 			return;
 		}
 


More information about the Libreoffice-commits mailing list