title: Immer only supports setting array indices and the 'length' property
body: <p>What types of things would cause <em>Immer only supports setting array indices and the 'length' property'</em> from the code below? This FoodLogState type is a class. I've done something very similar with no issue. I notice I am not updating even the array from state yet. Only the status that is a string.</p>
  <pre class="lang-js prettyprint-override"><code>    import { createAsyncThunk, createSlice } from &quot;@reduxjs/toolkit&quot;;
      import { FoodLogState, getFoodState } from &quot;../AccountAPI&quot;;
      
      export interface FoodLogs {
        foodLogs: Array&lt;FoodLogState&gt;;
        status: &quot;idle&quot; | &quot;loading&quot; | &quot;failed&quot;;
      }
      
      const initialState: FoodLogs = {
        foodLogs: null,
        status: &quot;idle&quot;,
      };
      
      export const getFoodLogsAsync = createAsyncThunk(
        &quot;foodsLogged/getFoodsLogged&quot;,
        async (uid: string, { rejectWithValue }) =&gt; {
          try {
            const response = await getFoodState(uid).catch((error) =&gt; {
              return rejectWithValue(error.message);
            });
            return response;
          } catch (error) {
            return rejectWithValue(error.message);
          }
        }
      );
      
      const foodsLogSlice = createSlice({
        name: &quot;foodsLogged&quot;,
        initialState,
        reducers: {},
        extraReducers: (builder) =&gt; {
          builder
            .addCase(getFoodLogsAsync.fulfilled, (state, action) =&gt; {
              //state.foodLogs = action.payload;
              state.status = &quot;idle&quot;;
            })
            .addCase(getFoodLogsAsync.rejected, (state, action) =&gt; {
              state.status = &quot;failed&quot;;
            })
            .addCase(getFoodLogsAsync.pending, (state) =&gt; {
              state.status = &quot;loading&quot;;
            });
        },
      });
      
      export const selectFoods = (state) =&gt; state.foodLog;
      
      export default foodsLogSlice.reducer;
  </code></pre>