mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: should be possible to remove all variants.
This commit is contained in:
		
							parent
							
								
									06ac056d2b
								
							
						
					
					
						commit
						a8bd6f8063
					
				@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 | 
			
		||||
The latest version of this document is always available in
 | 
			
		||||
[releases][releases-url].
 | 
			
		||||
 | 
			
		||||
# 3.6.5
 | 
			
		||||
- fix: should be possible to remove all variants. 
 | 
			
		||||
 | 
			
		||||
# 3.6.4
 | 
			
		||||
- fix: minur ux tweaks
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,9 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
 | 
			
		||||
        const { featureToggle } = ownProps;
 | 
			
		||||
        const currentVariants = featureToggle.variants || [];
 | 
			
		||||
        const variants = currentVariants.filter((v, i) => i !== index);
 | 
			
		||||
        updateWeight(variants, 1000);
 | 
			
		||||
        if (variants.length > 0) {
 | 
			
		||||
            updateWeight(variants, 1000);
 | 
			
		||||
        }
 | 
			
		||||
        requestUpdateFeatureToggleVariants(featureToggle, variants)(dispatch);
 | 
			
		||||
    },
 | 
			
		||||
    updateVariant: (index, variant) => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user