Small nullability check in manager.dart for null working directory (#17)
This squashes a potential bad interaction on initial launch that causes at the least a message in the terminal about using a null value instead of string.
This commit is contained in:
parent
692825c0ee
commit
5ddb7f80e2
|
@ -30,6 +30,9 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
|
|||
super.initState();
|
||||
getPreference<String>(prefWorkingDirectory).then((pref) {
|
||||
setState(() {
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
Directory.current = pref;
|
||||
});
|
||||
Future.delayed(Duration.zero, () => _getVms(context)); // Reload VM list when we enter the page.
|
||||
|
|
Loading…
Reference in New Issue