Skip to content

Commit

Permalink
Improve error check
Browse files Browse the repository at this point in the history
  • Loading branch information
abc873693 committed Jun 3, 2020
1 parent 6affa40 commit 80e48de
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/pages/leave/leave_apply_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,13 @@ class LeaveApplyPageState extends State<LeaveApplyPage>
Helper.instance.getLeavesSubmitInfo(
callback: GeneralCallback(
onSuccess: (LeaveSubmitInfoData data) {
if (data != null) {
setState(() {
setState(() {
if (data != null) {
leaveSubmitInfo = data;
state = _State.finish;
});
}
} else
state = _State.error;
});
},
onFailure: (DioError e) {
if (mounted)
Expand Down

0 comments on commit 80e48de

Please sign in to comment.