Skip to content

Commit 0ed004f

Browse files
authored
fix: filter me in plugin chart (#1369)
* fix: filter me in plugin chart * fix: chart plugin query base enabled
1 parent d0cdf7e commit 0ed004f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/src/app/chart/hooks/useBaseQueryData.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ export const useBaseQueryData = (cellFormat?: CellFormat) => {
1111
const { storage, onQueryError } = useContext(ChartContext);
1212
const query = storage?.query;
1313
const { user } = useSession();
14-
14+
const currentUserId = user?.id;
1515
const { data } = useQuery({
1616
queryKey: baseQueryKeys(baseId, query!, cellFormat),
17-
enabled: !!query || Boolean(pluginId),
17+
enabled: !!query && Boolean(pluginId) && Boolean(currentUserId),
1818
queryFn: async ({ queryKey }) => {
1919
return getBaseQueryData({
2020
pluginId,
2121
queryKeys: queryKey,
2222
onQueryError,
2323
options: {
24-
currentUserId: user?.id,
24+
currentUserId,
2525
},
2626
});
2727
},

0 commit comments

Comments
 (0)