Skip to content

Commit

Permalink
Fix invalid parameter destructuring in navigate calls (#4495)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldar authored Sep 2, 2024
1 parent 19ecd3d commit a91df10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions assets/js/dashboard/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function removeFilter(filterIndex, navigate, query) {
const newLabels = cleanLabels(newFilters, query.labels)

navigate({
search: ({ search }) => ({
search: (search) => ({
...search,
filters: newFilters,
labels: newLabels
Expand All @@ -34,7 +34,7 @@ function removeFilter(filterIndex, navigate, query) {

function clearAllFilters(navigate) {
navigate({
search: ({ search }) => ({
search: (search) => ({
...search,
filters: null,
labels: null
Expand Down Expand Up @@ -178,7 +178,7 @@ function Filters() {
}

function AppliedFilterPillHorizontal({filterIndex, filter}) {
const { query } = useQueryContext();
const { query } = useQueryContext();
const [_operation, filterKey, _clauses] = filter
const type = filterKey.startsWith(EVENT_PROPS_PREFIX) ? 'props' : filterKey
return (
Expand Down
4 changes: 2 additions & 2 deletions assets/js/dashboard/stats/graph/line-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ class LineGraph extends React.Component {

if (this.props.graphData.interval === 'month') {
this.props.navigate({
search: ({ search }) => ({ ...search, period: 'month', date })
search: (search) => ({ ...search, period: 'month', date })
})
} else if (this.props.graphData.interval === 'day') {
this.props.navigate({
search: ({ search }) => ({ ...search, period: 'day', date })
search: (search) => ({ ...search, period: 'day', date })
})
}
}
Expand Down

0 comments on commit a91df10

Please sign in to comment.