Skip to content

Commit

Permalink
fix(client): only parse data-path with values, close #2534
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jun 5, 2024
1 parent ee156f7 commit 13ec148
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/client/src/utils/query.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export const getQuery = (element: HTMLElement): string | null =>
element.dataset.path ?? null;
export const getQuery = (element: HTMLElement): string | null => {
const { path } = element.dataset;

return path?.length ? path : null;
};

0 comments on commit 13ec148

Please sign in to comment.