[fix](trx-frontend-http): skip auto-appending rig_id when already in URL
postPath() was duplicating rig_id on /select_rig calls, causing deserialization failure and silently dropping the rig switch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -3302,7 +3302,8 @@ window.trxScheduleUiFrameJob = scheduleUiFrameJob;
|
|||||||
|
|
||||||
async function postPath(path) {
|
async function postPath(path) {
|
||||||
// Auto-append rig_id so each tab targets its own rig.
|
// Auto-append rig_id so each tab targets its own rig.
|
||||||
if (lastActiveRigId) {
|
// Skip when the caller already included rig_id (e.g. /select_rig).
|
||||||
|
if (lastActiveRigId && !path.includes("rig_id=")) {
|
||||||
const sep = path.includes("?") ? "&" : "?";
|
const sep = path.includes("?") ? "&" : "?";
|
||||||
path = `${path}${sep}rig_id=${encodeURIComponent(lastActiveRigId)}`;
|
path = `${path}${sep}rig_id=${encodeURIComponent(lastActiveRigId)}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user