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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user