Skip to content

Commit

Permalink
fix(data-warehouse): Fixed type error with using in operator (#24675)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 authored Aug 29, 2024
1 parent 6eefdb1 commit 863525e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,10 @@ export const dataNodeLogic = kea<dataNodeLogicType>([
isShowingCachedResults: [
() => [(_, props) => props.cachedResults ?? null, (_, props) => props.query],
(cachedResults: AnyResponseType | null, query: DataNode): boolean => {
return !!cachedResults || ('query' in query && JSON.stringify(query.query) in cache.localResults)
return (
!!cachedResults ||
(cache.localResults && 'query' in query && JSON.stringify(query.query) in cache.localResults)
)
},
],
query: [(_, p) => [p.query], (query) => query],
Expand Down

0 comments on commit 863525e

Please sign in to comment.