Two instances of WebViewer were created on the same HTML element. Please create a new element for each instance of WebViewer

Which product are you using?

PDF.js Express Version

Detailed description of issue
{Two instances of WebViewer were created on the same HTML element. I want only one instance.}

Expected behaviour
{Only one instance of a webviewer should render}

Does your issue happen with every document, or just one?
{Every pdf}

Link to document
{Provide a link to the document in question if possible}
WebViewerModal.zip (132 Bytes)

Code snippet
{Attached a filet}

Hi nikhilhill19,

The zip file provided results in an empty JavaScript file.

However, there is a common scenario why this may happen, if you’re running a React application with Strict mode, the app technically renders each component twice. This isn’t a concern when you build your application, only when you’re developing, however, you can disable that. (If this is the case you’re seeing)

Best regards,
Tyler