File tree 1 file changed +7
-2
lines changed
tns-core-modules/application 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -413,11 +413,14 @@ function initComponentCallbacks() {
413
413
} ) ,
414
414
415
415
onConfigurationChanged : profile ( "onConfigurationChanged" , function ( newConfiguration : android . content . res . Configuration ) {
416
+ const rootView = getRootView ( ) ;
416
417
const newOrientation = getOrientationValue ( newConfiguration ) ;
417
418
418
419
if ( androidApp . orientation !== newOrientation ) {
419
420
androidApp . orientation = newOrientation ;
420
- orientationChanged ( getRootView ( ) , newOrientation ) ;
421
+ if ( rootView ) {
422
+ orientationChanged ( rootView , newOrientation ) ;
423
+ }
421
424
422
425
notify ( < OrientationChangedEventData > {
423
426
eventName : orientationChangedEvent ,
@@ -433,7 +436,9 @@ function initComponentCallbacks() {
433
436
434
437
if ( androidApp . systemAppearance !== newSystemAppearance ) {
435
438
androidApp . systemAppearance = newSystemAppearance ;
436
- systemAppearanceChanged ( getRootView ( ) , newSystemAppearance ) ;
439
+ if ( rootView ) {
440
+ systemAppearanceChanged ( rootView , newSystemAppearance ) ;
441
+ }
437
442
438
443
notify ( < SystemAppearanceChangedEventData > {
439
444
eventName : systemAppearanceChangedEvent ,
You can’t perform that action at this time.
0 commit comments