1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: Use type and value from action to remove tag (#238)

fixes: #237

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
This commit is contained in:
Christopher Kolstad 2021-02-04 16:08:25 +01:00 committed by GitHub
parent 02ab9169da
commit 50b6a5790d

View File

@ -16,7 +16,7 @@ const featureTags = (state = getInitState(), action) => {
case TAG_FEATURE_TOGGLE:
return state.push(new $MAP(action.tag));
case UNTAG_FEATURE_TOGGLE:
return state.remove(state.indexOf(t => t.id === action.value.tagId));
return state.remove(state.indexOf(t => t.value === action.tag.value && t.type === action.tag.type));
default:
return state;
}