Steps:
Execute:
console.log(await qrcode.toDataURL('I am a pony!', { type: 'svg' }))
Expected result:
data:image/svg+xml,%3Csvg%20xmlns
Actual result:
data:image/png;base64,iVBORw0K
Seems like the problem in the lib/server.js:
exports.toDataURL = function toDataURL (text, opts, cb) {
const params = checkParams(text, opts, cb)
const renderer = getRendererFromType(params.opts.type)
return render(renderer.renderToDataURL, text, params)
}
Because renderer/svg.js has no renderToDataURL function.
Steps:
Execute:
Expected result:
Actual result:
Seems like the problem in the
lib/server.js:Because
renderer/svg.jshas norenderToDataURLfunction.