Angularjs js给出了IE 11中未定义或空引用的错误

Angularjs js给出了IE 11中未定义或空引用的错误,angularjs,internet-explorer,pdf,Angularjs,Internet Explorer,Pdf,我的angular模块中有pdf.js和pdf.combined.js依赖项,它在chrome浏览器中运行良好,但在IE 11中生成空引用错误 pdf.combined.js if (!PDFJS.workerSrc && typeof document !== 'undefined') { // workerSrc is not set -- using last script url to define default location PDFJS.work

我的angular模块中有pdf.js和pdf.combined.js依赖项,它在chrome浏览器中运行良好,但在IE 11中生成空引用错误

pdf.combined.js

  if (!PDFJS.workerSrc && typeof document !== 'undefined') {
  // workerSrc is not set -- using last script url 
   to define default location
 PDFJS.workerSrc = (function () {
 'use strict';
  var pdfJsSrc = document.currentScript.src;
  return pdfJsSrc && pdfJsSrc.replace(/\.js$/i, '.worker.js');
 })();

 SCRIPT5007: Unable to get property 'src' of undefined or null reference

for line of code:
 var pdfJsSrc = document.currentScript.src;

使用web/compatibility.jsThank,这使它工作。使用web/compatibility.jsThank,这使它工作。