diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 8d306d36c..f3e723f2f 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -114,7 +114,7 @@ onBeforeRouteLeave((to, from, next) => { }); async function fetch(data) { - const rows = data[$attrs['key-data']] ?? data; + const rows = $attrs['key-data'] ? data[$attrs['key-data']] : data; resetData(rows); emit('onFetch', rows); return rows;