Skip to content

Commit 8d2e4b6

Browse files
authored
fix(web): error when no function data (#556)
1 parent cdda443 commit 8d2e4b6

File tree

1 file changed

+1
-1
lines changed
  • web/src/pages/app/functions/mods/FunctionPanel

1 file changed

+1
-1
lines changed

web/src/pages/app/functions/mods/FunctionPanel/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function FunctionList() {
2929
useFunctionListQuery({
3030
onSuccess: (data) => {
3131
store.setAllFunctionList(data.data);
32-
if (!store.currentFunction?.id) {
32+
if (!store.currentFunction?.id && data.data.length > 0) {
3333
store.setCurrentFunction(data.data[0]);
3434
}
3535
},

0 commit comments

Comments
 (0)