Skip to content

Commit

Permalink
remove refetchResult since result are same
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed May 8, 2023
1 parent cc5324f commit 7fc1210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset-frontend/src/hooks/apiResources/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const EMPTY_SCHEMAS = [] as SchemaOption[];
export function useSchemas(options: Params) {
const isMountedRef = useRef(false);
const { dbId, onSuccess, onError } = options || {};
const [trigger, refetchResult] = useLazySchemasQuery();
const [trigger] = useLazySchemasQuery();
const result = useSchemasQuery(
{ dbId, forceRefresh: false },
{
Expand Down Expand Up @@ -117,7 +117,7 @@ export function useSchemas(options: Params) {
}, [result, handleOnSuccess, handleOnError]);

return {
...(refetchResult.isUninitialized ? result : refetchResult),
...result,
refetch,
};
}

0 comments on commit 7fc1210

Please sign in to comment.