Skip to content

Commit afeba42

Browse files
authored
Prevent from crashing with null cannot be cast to non-null type kotlin.Any, (#489)
1 parent 49408ca commit afeba42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaContextModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class SafeAreaContextModule(reactContext: ReactApplicationContext?) :
1313
return NAME
1414
}
1515

16-
public override fun getTypedExportedConstants(): Map<String, Any> {
17-
return MapBuilder.of<String, Any>("initialWindowMetrics", getInitialWindowMetrics() as Any)
16+
public override fun getTypedExportedConstants(): Map<String, Any?> {
17+
return mapOf("initialWindowMetrics" to getInitialWindowMetrics())
1818
}
1919

2020
private fun getInitialWindowMetrics(): Map<String, Any>? {

0 commit comments

Comments
 (0)