diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index f3e723f2f..8d306d36c 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 = $attrs['key-data'] ? data[$attrs['key-data']] : data; + const rows = data[$attrs['key-data']] ?? data; resetData(rows); emit('onFetch', rows); return rows;