From 8f24039493fdae0e88220ce1abc12aaebe31ae42 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Thu, 29 Sep 2016 14:46:32 +0200 Subject: [PATCH] Remark for PR#2446: Check if 'highlight' is undefined. --- openslides/motions/static/js/motions/linenumbering.js | 3 +++ openslides/motions/static/js/motions/site.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openslides/motions/static/js/motions/linenumbering.js b/openslides/motions/static/js/motions/linenumbering.js index 518684c84..4b97c615c 100644 --- a/openslides/motions/static/js/motions/linenumbering.js +++ b/openslides/motions/static/js/motions/linenumbering.js @@ -88,6 +88,9 @@ angular.module('OpenSlidesApp.motions.lineNumbering', []) service = this; var addLine = function (text, highlight) { var node; + if (typeof highlight === 'undefined') { + highlight = 0; + } if (firstTextNode) { if (highlight == service._currentLineNumber - 1) { node = document.createElement('span'); diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index f99272503..1d90d1930 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -21,7 +21,7 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions', 'OpenSlid * other project that might want to use this HTML to PDF parser. * https://github.com/OpenSlides/OpenSlides/issues/2361 */ - return converter.convertHTML(motion.getTextWithLineBreaks($scope.version, 0), $scope); + return converter.convertHTML(motion.getTextWithLineBreaks($scope.version), $scope); } else { return converter.convertHTML(motion.getText($scope.version), $scope); }