Merge pull request #3676 from FinnStutzenstein/pdf-fix

Fixed pdf export when element is null
This commit is contained in:
Emanuel Schütze 2018-04-04 11:24:47 +02:00 committed by GitHub
commit acc86b4c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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');
}
},