Remark for PR#2446: Check if 'highlight' is undefined.

This commit is contained in:
Emanuel Schuetze 2016-09-29 14:46:32 +02:00
parent 7ea1a7e481
commit 8f24039493
2 changed files with 4 additions and 1 deletions

View File

@ -88,6 +88,9 @@ angular.module('OpenSlidesApp.motions.lineNumbering', [])
service = this; service = this;
var addLine = function (text, highlight) { var addLine = function (text, highlight) {
var node; var node;
if (typeof highlight === 'undefined') {
highlight = 0;
}
if (firstTextNode) { if (firstTextNode) {
if (highlight == service._currentLineNumber - 1) { if (highlight == service._currentLineNumber - 1) {
node = document.createElement('span'); node = document.createElement('span');

View File

@ -21,7 +21,7 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions', 'OpenSlid
* other project that might want to use this HTML to PDF parser. * other project that might want to use this HTML to PDF parser.
* https://github.com/OpenSlides/OpenSlides/issues/2361 * 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 { } else {
return converter.convertHTML(motion.getText($scope.version), $scope); return converter.convertHTML(motion.getText($scope.version), $scope);
} }