Skip to content

Commit

Permalink
chore: code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Mar 1, 2025
1 parent c0b04d2 commit f964fe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/shared/src/features/pdf-viewer/pdf-viewer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ export class PicsaPDFViewerService extends PicsaAsyncService {
const useInlineScripts = true;
try {
// As ngx-extended viewer uses effect signal for it's own service use injection context to ensure availability
runInInjectionContext(this.injector, async () => {
await runInInjectionContext(this.injector, async () => {
const needsES5 = await new PDFScriptLoaderService(null as any, null as any)['needsES5'](useInlineScripts);
this.isCompatible = !needsES5;
console.log(`[PDF Viewer] Compatible: ${this.isCompatible}`);
});
} catch (error) {
this.isCompatible = false;
Expand Down

0 comments on commit f964fe0

Please sign in to comment.