Skip to content

Commit 6069a68

Browse files
update
1 parent 97cdd8c commit 6069a68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react/src/hooks/useDomWidth.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const useDomWidth = ({ selector, enable }: { selector: string; enable: bo
1515
const { id, mounted } = useDiffContext.useShallowStableSelector((s) => ({ id: s.id, mounted: s.mounted }));
1616

1717
useEffect(() => {
18-
if (enable && mounted) {
18+
if (enable) {
1919
const container = document.querySelector(`#diff-root${id}`);
2020

2121
const wrapper = container?.querySelector(selector);

packages/react/src/hooks/useSyncHeight.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const useSyncHeight = ({
2020
const { id, mounted } = useDiffContext.useShallowStableSelector((s) => ({ id: s.id, mounted: s.mounted }));
2121

2222
useEffect(() => {
23-
if (enable && mounted) {
23+
if (enable) {
2424
const container = document.querySelector(`#diff-root${id}`);
2525

2626
const elements = Array.from(container?.querySelectorAll(selector) || []);

0 commit comments

Comments
 (0)