We
have fixed the reported issue in “Script error appears when we
hide the PDF Viewer” and a fix for
this issue is available in version 20.4.53.
So, kindly update our packages to the latest version
(v20.4.53) to resolve this issue at your end.
Please refer to the below sample
and the release notes.
sample: https://stackblitz.com/edit/angular-hjvpzk-ajzxxb
Link: https://ej2.syncfusion.com/angular/documentation/release-notes/20.4.53/?type=all
Kindly let us know
if you still have any issues.