Skip to content

Commit

Permalink
fix: only set error if error isn ull
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikOseberg committed Nov 16, 2022
1 parent e5614d7 commit ffc52ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/FlagProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const FlagProvider: React.FC<React.PropsWithChildren<IFlagProvider>> = ({
});

client.current.on('error', (e: any) => {
setFlagsError(e);
if (flagsError === null) {
setFlagsError(e);
}
});

React.useEffect(() => {
Expand Down

0 comments on commit ffc52ae

Please sign in to comment.