Skip to content

Commit

Permalink
Correctly render variables panel with overridden lookup vars (#1412)
Browse files Browse the repository at this point in the history
## Changes
Correctly render variables panel with overridden lookup vars

Fixes #1410

## Tests
Manually
  • Loading branch information
ilia-db authored Oct 29, 2024
1 parent d1b8508 commit 7b88151
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {WorkspaceFolderManager} from "../../vscode-objs/WorkspaceFolderManager";
export type BundleVariable = Required<BundleSchema>["variables"][string] & {
valueInTarget?: string;
vscodeOverrideValue?: string;
required: boolean;
};

export type BundleVariableModelState = {
Expand Down Expand Up @@ -180,8 +179,8 @@ export class BundleVariableModel extends BaseModelWithStateCache<BundleVariableM
variables[key] = {
...definition,
lookup:
typeof inTargetVariable === "object"
? inTargetVariable
typeof inTargetVariable?.lookup === "object"
? inTargetVariable.lookup
: definition.lookup,

// If the value is not required based on our heuristic check, we use the value from the validate
Expand All @@ -194,7 +193,6 @@ export class BundleVariableModel extends BaseModelWithStateCache<BundleVariableM
: inTargetPostValidateVariables[key]?.value ??
definition.default,
vscodeOverrideValue: overrides[key],
required: isRequired,
};
}

Expand Down

0 comments on commit 7b88151

Please sign in to comment.