ng2-pdfjs-viewer icon indicating copy to clipboard operation
ng2-pdfjs-viewer copied to clipboard

The component throws an error on SSR

Open enea4science opened this issue 2 years ago • 0 comments

Because it uses window object directly: https://github.com/intbot/ng2-pdfjs-viewer/blob/6cc01b1d56729bacec301f04cfbe68ebfaf29062/lib/src/ng2-pdfjs-viewer.component.ts#L127

On way to solve this is to use the window from the token, or to not run the this logic at all wrapped with isPlatformBrowser

enea4science avatar Jun 14 '23 14:06 enea4science