Skip to content

Commit

Permalink
fix(web): error when no function data (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeezQ authored Dec 18, 2022
1 parent cdda443 commit 8d2e4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/pages/app/functions/mods/FunctionPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function FunctionList() {
useFunctionListQuery({
onSuccess: (data) => {
store.setAllFunctionList(data.data);
if (!store.currentFunction?.id) {
if (!store.currentFunction?.id && data.data.length > 0) {
store.setCurrentFunction(data.data[0]);
}
},
Expand Down

0 comments on commit 8d2e4b6

Please sign in to comment.