-
-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove featureSwitchRefactor flag #5329
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -96,7 +96,11 @@ export const useFeatureToggleSwitch: UseFeatureToggleSwitchType = ( | |||
}; | |||
|
|||
const ensureActiveStrategies: Middleware = (next) => { | |||
if (!config.hasStrategies || config.hasEnabledStrategies) { | |||
if ( | |||
newState === false || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other conditions should never be met with newState===false
, but adding this makes it more consistent with our actual business logic
refetchFeature(); | ||
if (callback) callback(); | ||
}; | ||
const handleToggle = (newState: boolean, onRollback: () => void) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using new FeatureSwitch here allows us to remove legacy implementation not only from the table.
Cleanup. This change has been rolled out to significant number of customers already, and we have another parallel version behind a flag.