According to the documentation [1] the function canvas.getDataURL() takes a quality level as second parameter. It is expected that this parameter is a number in the range [0,1] rather than an object. This wasn't visible as an error, because the documentation also says: "If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored."
According to the documentation [1] the function
canvas.getDataURL()
takes a quality level as second parameter. It is expected that this parameter is a number in the range [0,1] rather than an object. This wasn't visible as an error, because the documentation also says: "If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored."[1] https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL