mirror of
https://github.com/inventree/inventree-app.git
synced 2026-01-30 01:33:56 +00:00
Check if widget is mounted before calling setstate() (#193)
This commit is contained in:
@@ -177,7 +177,9 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
||||
|
||||
// Attempt server connection
|
||||
InvenTreeAPI().connectToServer().then((result) {
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user