You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A TypeError occurs within the useAction hook of the Blinks SDK when attempting to use a finally block after a promise chain.
Steps to Reproduce
Integrate the Blinks SDK within a React component using the useAction hook.
Trigger the component that executes the useAction hook.
Observe the console for any errors during the action fetching process.
Error Message
ERROR TypeError: _chunk3VHJSHHRcjs.Action.fetch(a(...)", e); setAction(null); }).finally is not a function (it is undefined)
Code Snippet
useEffect(()=>{setIsLoading(true);if(!isRegistryLoaded||!actionApiUrl){return;}letignore=false;_chunk3VHJSHHRcjs.Action.fetch(actionApiUrl,void0,supportStrategy).then((action2)=>{if(ignore){return;}setAction(action2);}).catch((e)=>{console.error("[@dialectlabs/blinks] Failed to fetch action",e);setAction(null);}).finally(()=>{if(!ignore){setIsLoading(false);}});return()=>{ignore=true;};},[actionApiUrl,isRegistryLoaded]);
Suggested Fix
Removing the finally block resolves the error and allows the component to function, but this is not ideal. A better fix would be to ensure that the Promise implementation in the environment includes finally or to add a polyfill.
Environment
React Native version: 0.74.3
react-native-picker-select version: ^9.1.3
@dialectlabs/blinks version: ^0.8.0
@dialectlabs/blinks-react-native version: ^0.2.0
The text was updated successfully, but these errors were encountered:
Issue Summary
A TypeError occurs within the
useAction
hook of the Blinks SDK when attempting to use afinally
block after a promise chain.Steps to Reproduce
useAction
hook.useAction
hook.Error Message
Code Snippet
Suggested Fix
Removing the
finally
block resolves the error and allows the component to function, but this is not ideal. A better fix would be to ensure that the Promise implementation in the environment includesfinally
or to add a polyfill.Environment
0.74.3
react-native-picker-select
version:^9.1.3
@dialectlabs/blinks
version:^0.8.0
@dialectlabs/blinks-react-native
version:^0.2.0
The text was updated successfully, but these errors were encountered: