Skip to content

Commit

Permalink
Update check
Browse files Browse the repository at this point in the history
  • Loading branch information
joey-grafana committed Jan 20, 2025
1 parent 557c612 commit bd99907
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Explore/actions/AddToFiltersAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export class AddToFiltersAction extends SceneObjectBase<AddToFiltersActionState>

public static Component = ({ model }: SceneComponentProps<AddToFiltersAction>) => {
const key = model.state?.labelKey ?? '';
const value = model.state?.frame.fields.filter(x => x.type !== 'time')[0].labels?.[key] ?? '';
const field = model.state?.frame.fields.filter(x => x.type !== 'time');
const value = field?.[0]?.labels?.[key] ?? '';
const filterExists = filterExistsForKey(getFiltersVariable(model), key, value.replace(/"/g, ''));

if (!filterExists) {
Expand Down

0 comments on commit bd99907

Please sign in to comment.