Skip to content

Commit 2d28a63

Browse files
committed
altering the variable definitions
1 parent d1fe322 commit 2d28a63

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

components/dash-core-components/src/utils/ResizeDetector.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ import PropTypes from 'prop-types';
44
// Debounce 50 ms
55
const DELAY = 50;
66

7-
let resizeTimeout;
8-
97
const ResizeDetector = props => {
108
const {onResize, children, targets} = props;
119
const ref = createRef();
10+
let resizeTimeout;
1211

1312
const debouncedResizeHandler = useCallback(() => {
1413
if (resizeTimeout) {
1514
clearTimeout(resizeTimeout);
1615
}
17-
var resizeTimeout = setTimeout(() => {
16+
resizeTimeout = setTimeout(() => {
1817
onResize(true); // Force on resize.
1918
}, DELAY);
2019
}, [onResize]);

0 commit comments

Comments
 (0)