Skip to content

Commit

Permalink
fix(wifi): hotfix wifi hotspot update with bun
Browse files Browse the repository at this point in the history
PR with fix for bun: oven-sh/bun#17269
  • Loading branch information
pjeweb committed Feb 12, 2025
1 parent e2b3033 commit a980d94
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/modules/wifi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a980d94

Please sign in to comment.