Skip to content

Commit

Permalink
#2196 make sure that only the file ending of old configurations is co…
Browse files Browse the repository at this point in the history
…nverted from *.js to *.mjs; before the bugfix, it might also rename the domain "jsdelivr" to "mjsdelivr"
  • Loading branch information
stephanrauh committed Apr 20, 2024
1 parent c8c05ef commit 139e56a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions projects/ngx-extended-pdf-viewer/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,3 +546,4 @@
- 20.0.0-alpha.0 make Sonarcloud happy by shortening an if statement; #2279 fix the highlight editor toolbar in rtl languages; #2282 improved compatibility to ng-zorro; #2293 improve the CSS encapsulation; #2294 make sure that the highlight editor can be closed again; #2295 Checkboxes with non-boolean export values can now be set by default from Angular
- 20.0.0-alpha.1 #2282 improved compatibility to ng-zorro; #2293 improve the CSS encapsulation (the text layer was broken in version 20.0.0-alpha.0)
- 20.0.0-alpha.2 #2274 now ngx add ngx-extended-pdf-viewer also supports stand-alone components
- 20.0.0-alpha.3 #2196 make sure that only the file ending of old configurations is converted from _.js to _.mjs; before the bugfix, it might also rename the domain "jsdelivr" to "mjsdelivr"
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,9 @@ export class NgxExtendedPdfViewerComponent implements OnInit, AfterViewInit, OnC
const pdfJsPath = this.getPdfJsPath('pdf', needsES5);
if (pdfJsPath.endsWith('.mjs')) {
const src = pdfDefaultOptions.workerSrc();
pdfDefaultOptions.workerSrc = () => src.replace('.js', '.mjs');
if (src.endsWith('.js')) {
pdfDefaultOptions.workerSrc = () => src.substring(0, src.length - 3) + '.mjs';
}
}
const script = this.createScriptElement(pdfJsPath);
script.onload = () => {
Expand Down

0 comments on commit 139e56a

Please sign in to comment.