Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0529b85

Browse files
authoredAug 6, 2024··
fix: async not transpiled on babel for older browser
- old browser (chrome v50) gets error from the async await - despite attempt to transpile with babel-plugin-transform-async-to-generator, it still not transpiled on my compiler - solution is to update the codebase, since there is no value to return, might as well directly return the method result if it's a Promise
1 parent 65e3f59 commit 0529b85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/FlagProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const FlagProvider: FC<PropsWithChildren<IFlagProvider>> = ({
107107
() => ({
108108
on: ((event, callback, ctx) => client.current.on(event, callback, ctx)) as IFlagContextValue['on'],
109109
off: ((event, callback) => client.current.off(event, callback)) as IFlagContextValue['off'],
110-
updateContext: async (context) => await client.current.updateContext(context),
110+
updateContext: (context) => client.current.updateContext(context),
111111
isEnabled: (toggleName) => client.current.isEnabled(toggleName),
112112
getVariant: (toggleName) => client.current.getVariant(toggleName),
113113
client: client.current,

0 commit comments

Comments
 (0)
Please sign in to comment.