From 5575e985dcbaa0ef47cba69afb893505da682151 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Mon, 13 Apr 2020 10:32:26 +1000 Subject: [PATCH] Fix effect dependency --- src/helpers/usePreventTouch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/usePreventTouch.js b/src/helpers/usePreventTouch.js index e98bd23..b101e4b 100644 --- a/src/helpers/usePreventTouch.js +++ b/src/helpers/usePreventTouch.js @@ -16,7 +16,7 @@ function usePreventTouch(elementRef) { element.removeEventListener("touchstart", prevent3DTouch); } }; - }, [elementRef.current]); + }, [elementRef]); } export default usePreventTouch;