mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-17 12:55:57 +08:00
两个地方同时调用导致_spf为null而取不到值
This commit is contained in:
@ -24,8 +24,9 @@ class SpUtil {
|
||||
static Future<SpUtil> getInstance() async {
|
||||
if (_instance == null) {
|
||||
_instance = new SpUtil._();
|
||||
}
|
||||
if (_spf == null) {
|
||||
await _instance._init();
|
||||
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
@ -117,4 +118,4 @@ class SpUtil {
|
||||
if (_beforeCheck()) return null;
|
||||
return _spf.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user