Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!user) {
return;
}
const context = toTweekContext(user);
if (tweekRepository) {
tweekRepository.updateContext((prev) => {
if (equals(prev, context)) {
return null;
}
return context;
});
} else {
setTweekRepository(
new TweekRepository({
client: tweekClient,
context,
}),
);
}
}, [user]);