iOS: fix locale return nil in some case
This commit is contained in:
parent
b4493ef777
commit
98c3bc6668
@ -92,8 +92,8 @@ - (instancetype)init {
|
|||||||
@"hasNotch": @(hasNotch()),
|
@"hasNotch": @(hasNotch()),
|
||||||
@"deviceBrand": @"Apple",
|
@"deviceBrand": @"Apple",
|
||||||
@"deviceModel": platform,
|
@"deviceModel": platform,
|
||||||
@"localeLanguage": [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode],
|
@"localeLanguage": [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode] ?: @"",
|
||||||
@"localeCountry": [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode],
|
@"localeCountry": [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode] ?: @"",
|
||||||
}.mutableCopy;
|
}.mutableCopy;
|
||||||
self.registry = [[DoricRegistry alloc] initWithJSEngine:self];
|
self.registry = [[DoricRegistry alloc] initWithJSEngine:self];
|
||||||
[self ensureRunOnJSThread:^() {
|
[self ensureRunOnJSThread:^() {
|
||||||
|
Reference in New Issue
Block a user