summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-03-19 11:52:54 -0400
committerAron Budea <aron.budea@collabora.com>2020-04-02 10:13:39 +0200
commiteef4edf8f6e454e607f4d3bc80af8d31c15e10df (patch)
tree009db904b55e1caf89a431f7ed49d2265f630ff2
parent678603049465851e09c189014960553b4476618e (diff)
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@collabora.com> Reviewed-by: Henry Castro <hcastro@collabora.com> (cherry picked from commit af338541a88d4f90d1859ba60d8de6e3e90f1423)
-rw-r--r--loleaflet/src/control/Control.PartsPreview.js2
1 files changed, 1 insertions, 1 deletions
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;
}