Hello. I noticed that my server was getting hit with tons of requests for /undefined. Although the response was only 238 bytes, the great number of the requests per second (less than 60) was adding up. I tracked the problem down to BrowserCodeReader.ts on line 1161 during image cleanup in the _destroyImageElement function. Before removing the image src attribute, it is assigned the value of undefined. In the Safari web browser on macOS, this results in a request as if undefined is an expected resource. I do not see this behavior in Google Chrome.
Hello. I noticed that my server was getting hit with tons of requests for
/undefined
. Although the response was only 238 bytes, the great number of the requests per second (less than 60) was adding up. I tracked the problem down toBrowserCodeReader.ts
on line 1161 during image cleanup in the_destroyImageElement
function. Before removing the imagesrc
attribute, it is assigned the value ofundefined
. In the Safari web browser on macOS, this results in a request as ifundefined
is an expected resource. I do not see this behavior in Google Chrome.https://github.com/zxing-js/library/blob/7b0f4e907e4d59565e6f2be35f714a7500294c30/src/browser/BrowserCodeReader.ts#L1159-L1163