未验证 提交 9434bb64 编写于 作者: G Gary Qian 提交者: GitHub

Return null when locale has not been set in loocale closure. (#6936)

上级 4b233f03
......@@ -42,7 +42,12 @@ void _updateWindowMetrics(double devicePixelRatio,
typedef _LocaleClosure = String Function();
String _localeClosure() => window.locale.toString();
String _localeClosure() {
if (window.locale == null) {
return null;
}
return window.locale.toString();
}
@pragma('vm:entry-point')
_LocaleClosure _getLocaleClosure() => _localeClosure;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册