Skip to content

Commit

Permalink
1260-Invalid-attempt-to-spread-non-iterable-instance: Added additiona… (
Browse files Browse the repository at this point in the history
#3130)

…l handler to check if data is an array
  • Loading branch information
geodem127 authored Jan 15, 2025
1 parent 5b66a39 commit a1863cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shell/store/contentVersions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { request } from "utility/request";

export function contentVersions(state = {}, action) {
const existingVersions = state[action.itemZUID] || [];
const existingVersions = Array.isArray(state[action.itemZUID])
? state[action.itemZUID]
: [];

switch (action.type) {
case "FETCH_ITEM_SUCCESS":
Expand Down

0 comments on commit a1863cf

Please sign in to comment.