mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #8028 from Snuffleupagus/tests-prevent-console-errors
Prevent browser console errors during testing
This commit is contained in:
commit
ec26a7e565
4 changed files with 9 additions and 13 deletions
|
@ -61,7 +61,10 @@ FontLoader.prototype = {
|
|||
clear: function fontLoaderClear() {
|
||||
var styleElement = this.styleElement;
|
||||
if (styleElement) {
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
if (styleElement.parentNode) {
|
||||
// Prevent "TypeError: styleElement.parentNode is null" during testing.
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
}
|
||||
styleElement = this.styleElement = null;
|
||||
}
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue