File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/tools/wifi-qr-code-generator Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ export function useWifiQRCode({
119
119
async ( ) => {
120
120
// @see https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11
121
121
// This is the full spec, there's quite a bit of logic to generate the string embeddedin the QR code.
122
- text . value = getQrCodeText ( {
122
+ const qrText = getQrCodeText ( {
123
123
ssid : get ( ssid ) ,
124
124
password : get ( password ) ,
125
125
encryption : get ( encryption ) ,
@@ -129,8 +129,8 @@ export function useWifiQRCode({
129
129
eapIdentity : get ( eapIdentity ) ,
130
130
eapPhase2Method : get ( eapPhase2Method ) ,
131
131
} ) ;
132
- if ( text . value ) {
133
- qrcode . value = await QRCode . toDataURL ( get ( text . value ) . trim ( ) , {
132
+ if ( qrText ) {
133
+ qrcode . value = await QRCode . toDataURL ( get ( qrText ) . trim ( ) , {
134
134
color : {
135
135
dark : get ( foreground ) ,
136
136
light : get ( background ) ,
@@ -139,6 +139,7 @@ export function useWifiQRCode({
139
139
errorCorrectionLevel : 'M' ,
140
140
...options ,
141
141
} ) ;
142
+ text . value = qrText ;
142
143
}
143
144
} ,
144
145
{ immediate : true } ,
You can’t perform that action at this time.
0 commit comments