mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #22779] [CLOSED] fix: resolve ReferenceError in InputVariablesModal preventing prompt variable usage #65719
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22779
Author: @joaquinhuigomez
Created: 3/18/2026
Status: ❌ Closed
Base:
dev← Head:fix/input-variables-modal-reference-error📝 Commits (10+)
fe6783cMerge pull request #19030 from open-webui/devfc05e0aMerge pull request #19405 from open-webui/deve3faec6Merge pull request #19416 from open-webui/dev9899293Merge pull request #19448 from open-webui/dev140605eMerge pull request #19462 from open-webui/dev6f1486fMerge pull request #19466 from open-webui/devd95f533Merge pull request #19729 from open-webui/deva7271530.6.43 (#20093)6adde20Merge pull request #20394 from open-webui/devf9b0534Merge pull request #20522 from open-webui/dev📊 Changes
1 file changed (+18 additions, -18 deletions)
View changed files
📝
src/lib/components/chat/MessageInput/InputVariablesModal.svelte(+18 -18)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
Fixes #22748 — The
InputVariablesModalcomponent throwsReferenceError: idx is not definedat line 39, causing the prompt variables modal to show an infinite loading spinner. The entire prompt variable feature is broken.Root cause: The
{@const}destructuring with rest syntax ({ type, ...variableAttributes }) inside an{#each}block triggers a scoping issue in Svelte 5's legacy compatibility mode, where the loop index variableidxbecomes undefined in the compiled output.Fixed
idxtovariableIdxto avoid the naming collision{@const}rest destructuring withObject.fromEntries(Object.entries(...).filter(...))to work around the Svelte 5 compilation scoping bugScreenshots or Videos
Before: Modal shows infinite loading spinner, console shows
ReferenceError: idx is not definedAfter: Modal renders correctly, prompt variables can be filled in
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.