Skip to content

Commit

Permalink
update dimension log
Browse files Browse the repository at this point in the history
  • Loading branch information
zoeyang7633 committed Apr 24, 2024
1 parent 1b1765b commit 1520061
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/clarity-js/src/interaction/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ function similar(last: ScrollState, current: ScrollState): boolean {
}

export function compute(): void {
const sTopTarget = metadata(initTopNode, null);
const sBottomTarget = metadata(initBottomNode, null);
dimension.log(Dimension.InitialTop, sTopTarget?.hash?.[1]);
dimension.log(Dimension.InitialBottom, sBottomTarget?.hash?.[1]);
if (initTopNode || initBottomNode) {
const sTopTarget = metadata(initTopNode, null);
const sBottomTarget = metadata(initBottomNode, null);
dimension.log(Dimension.InitialTop, sTopTarget?.hash?.[1]);
dimension.log(Dimension.InitialBottom, sBottomTarget?.hash?.[1]);
}
}

export function stop(): void {
Expand Down

0 comments on commit 1520061

Please sign in to comment.