File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
adminforth/spa/src/components Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,12 @@ async function loadMoreOptions(columnName, searchTerm = '') {
205
205
},
206
206
});
207
207
208
+ if (! list || ! Array .isArray (list .items )) {
209
+ console .warn (` Unexpected API response for column ${ columnName} :` , list);
210
+ state .hasMore = false ;
211
+ return ;
212
+ }
213
+
208
214
if (! columnOptions .value [columnName]) {
209
215
columnOptions .value [columnName] = [];
210
216
}
@@ -247,6 +253,12 @@ async function searchOptions(columnName, searchTerm) {
247
253
},
248
254
});
249
255
256
+ if (! list || ! Array .isArray (list .items )) {
257
+ console .warn (` Unexpected API response for column ${ columnName} :` , list);
258
+ state .hasMore = false ;
259
+ return ;
260
+ }
261
+
250
262
columnOptions .value [columnName] = list .items ;
251
263
columnOffsets[columnName] = 100 ;
252
264
state .hasMore = list .items .length === 100 ;
You can’t perform that action at this time.
0 commit comments