Default to error correction Q when there is a center image (#19593)

default to error correction Q when there is a center image
This commit is contained in:
Bram Kragten 2024-01-31 18:48:45 +01:00 committed by GitHub
parent 462ac79890
commit 95920ba710
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,8 @@ export class HaQrCode extends LitElement {
const computedStyles = getComputedStyle(this);
QRCode.toCanvas(canvas, this.data, {
errorCorrectionLevel: this.errorCorrectionLevel,
errorCorrectionLevel:
this.errorCorrectionLevel || (this.centerImage ? "Q" : "M"),
width: this.width,
scale: this.scale,
margin: this.margin,