Skip to content

Commit

Permalink
fix(insights): query source editor works again
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Jan 26, 2024
1 parent f22c21f commit 899fc9e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/scenes/insights/Insight.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './Insight.scss'

import equal from 'fast-deep-equal'
import { BindLogic, useActions, useMountedLogic, useValues } from 'kea'
import { useEffect } from 'react'
import { InsightPageHeader } from 'scenes/insights/InsightPageHeader'
Expand Down Expand Up @@ -50,9 +51,9 @@ export function Insight({ insightId }: InsightSceneProps): JSX.Element {

const actuallyShowQueryEditor = insightMode === ItemMode.Edit && showQueryEditor

const setQuery = (query: Node): void => {
if (!isInsightVizNode(query)) {
setInsightQuery(query)
const setQuery = (queryToSet: Node): void => {
if (!equal(query, queryToSet)) {
setInsightQuery(queryToSet)
}
}

Expand Down

0 comments on commit 899fc9e

Please sign in to comment.