File tree 1 file changed +6
-2
lines changed
lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,19 @@ public void run() {
14
14
};
15
15
16
16
public static void runOnUIThread (Runnable runnable ) {
17
- ReactContextHolder .getContext ().runOnUiQueueThread (runnable );
17
+ if (ReactContextHolder .getContext () != null ) {
18
+ ReactContextHolder .getContext ().runOnUiQueueThread (runnable );
19
+ }
18
20
}
19
21
20
22
public static void dispatchUIUpdates (final Runnable userRunnable ) {
21
23
runOnUIThread (new Runnable () {
22
24
@ Override
23
25
public void run () {
24
26
userRunnable .run ();
25
- ReactContextHolder .getContext ().runOnNativeModulesQueueThread (sUIUpdateClosure );
27
+ if (ReactContextHolder .getContext () != null ) {
28
+ ReactContextHolder .getContext ().runOnNativeModulesQueueThread (sUIUpdateClosure );
29
+ }
26
30
}
27
31
});
28
32
}
You can’t perform that action at this time.
0 commit comments