diff --git a/src/provider.tsx b/src/provider.tsx index a9a3404..58f4670 100644 --- a/src/provider.tsx +++ b/src/provider.tsx @@ -31,10 +31,8 @@ export const PushyProvider = ({ const [lastError, setLastError] = useState(); const dismissError = useCallback(() => { - if (lastError) { - setLastError(undefined); - } - }, [lastError]); + setLastError(undefined); + }, []); const showAlert = useCallback( (...args: Parameters) => {