修改jscrash问题

Signed-off-by: fanhaichao <fan3318172@qq.com>
This commit is contained in:
fanhaichao
2025-01-06 11:20:13 +08:00
parent 33539b9304
commit 393bbc86f3
@@ -185,7 +185,7 @@ export default class MainAbility extends ServiceExtension {
onConfigurationUpdate(config): void {
Log.showInfo(TAG, 'onConfigurationUpdated, config:' + JSON.stringify(config));
const systemLanguage = AppStorage.get('systemLanguage');
if(systemLanguage !== config.language) {
if(systemLanguage && systemLanguage !== config.language) {
this.clearCacheWhenLanguageChange();
}
AppStorage.setOrCreate('systemLanguage', config.language);