Fixed pdf export when element is null

This commit is contained in:
FinnStutzenstein 2018-03-22 09:19:23 +01:00
parent 209ea70d75
commit badd6764aa

View File

@ -473,7 +473,8 @@ angular.module('OpenSlidesApp.core.pdf', [])
"insert": ["color:green", "text-decoration:underline"]
},
getLineNumber = function (element) {
if (element.nodeName == 'SPAN' && element.getAttribute('class') && element.getAttribute('class').indexOf('os-line-number') > -1) {
if (element && element.nodeName == 'SPAN' && element.getAttribute('class') &&
element.getAttribute('class').indexOf('os-line-number') > -1) {
return element.getAttribute('data-line-number');
}
},