mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-27 18:16:15 -04:00
Fix typecheck
This commit is contained in:
parent
0fc30feaed
commit
38ec3f7502
1 changed files with 4 additions and 3 deletions
|
@ -119,7 +119,7 @@ export function useWifiQRCode({
|
|||
async () => {
|
||||
// @see https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11
|
||||
// This is the full spec, there's quite a bit of logic to generate the string embeddedin the QR code.
|
||||
text.value = getQrCodeText({
|
||||
const qrText = getQrCodeText({
|
||||
ssid: get(ssid),
|
||||
password: get(password),
|
||||
encryption: get(encryption),
|
||||
|
@ -129,8 +129,8 @@ export function useWifiQRCode({
|
|||
eapIdentity: get(eapIdentity),
|
||||
eapPhase2Method: get(eapPhase2Method),
|
||||
});
|
||||
if (text.value) {
|
||||
qrcode.value = await QRCode.toDataURL(get(text.value).trim(), {
|
||||
if (qrText) {
|
||||
qrcode.value = await QRCode.toDataURL(get(qrText).trim(), {
|
||||
color: {
|
||||
dark: get(foreground),
|
||||
light: get(background),
|
||||
|
@ -139,6 +139,7 @@ export function useWifiQRCode({
|
|||
errorCorrectionLevel: 'M',
|
||||
...options,
|
||||
});
|
||||
text.value = qrText;
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue