From a980d94844fb5dda4d49d638a62d691841edefb9 Mon Sep 17 00:00:00 2001 From: Paul Golmann Date: Wed, 12 Feb 2025 23:09:07 +0100 Subject: [PATCH] fix(wifi): hotfix wifi hotspot update with bun PR with fix for bun: https://github.com/oven-sh/bun/pull/17269 --- src/modules/wifi.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/modules/wifi.ts b/src/modules/wifi.ts index 1d764bf..baa194c 100644 --- a/src/modules/wifi.ts +++ b/src/modules/wifi.ts @@ -995,6 +995,22 @@ function nmConnSetHotspotFields( "802-11-wireless.channel": newChannel.nmChannel, }; + // FIXME: This should be an empty string for auto but bun currently drops empty arguments + // see https://github.com/oven-sh/bun/pull/17269 + if (newChannel.nmBand === "") { + // @ts-ignore + // biome-ignore lint/performance/noDelete: see comment above + delete settingsToChange["802-11-wireless.band"]; + } + + // FIXME: This should be an empty string for auto but bun currently drops empty arguments + // see https://github.com/oven-sh/bun/pull/17269 + if (newChannel.nmChannel === "") { + // @ts-ignore + // biome-ignore lint/performance/noDelete: see comment above + delete settingsToChange["802-11-wireless.channel"]; + } + return nmConnSetFields(uuid, settingsToChange); }