Need help in resolving the error in "readImageDICOMFileSeries"

Firstly, I am new to ITK-wasm and even JS.
I am trying out an example to read DICOM image using ITK.js.
I have followed “itk-read-dicom” on Glitch (!/itk-read-dicom?path=src%2Findex.js%3A27%3A37), but I am still getting an error when reading multiple DICOM images (reading a single image works fine).

I then modified the code a bit, as per my understanding; but, still getting an error.
Below is the code.

          return readImageDICOMFileSeries(files, true)
            .then(function({image, webWorkerPool}) {
            .catch((error) => {
              console.log(`Error: ${error}`);

Below is the error I am getting…

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'terminate')

Thanks in advance! Please let me know if more information is required.