fix: gracefully handle malformed global tags array in taggedOperations selector (via #5159)

* fix: handle malformed global tags array in taggedOperations

* handle non-array global tags as well

* update test imports

* remove stray brackets
This commit is contained in:
kyle
2019-02-05 20:10:18 -06:00
committed by GitHub
parent 52ce2871a2
commit b716ed2515
2 changed files with 174 additions and 9 deletions

View File

@@ -225,7 +225,10 @@ export const operationsWithRootInherited = createSelector(
export const tags = createSelector(
spec,
json => json.get("tags", List())
json => {
const tags = json.get("tags", List())
return List.isList(tags) ? tags.filter(tag => Map.isMap(tag)) : List()
}
)
export const tagDetails = (state, tag) => {