Skip to content

Commit

Permalink
Prevent from crashing with null cannot be cast to non-null type kotli…
Browse files Browse the repository at this point in the history
…n.Any, (#489)
  • Loading branch information
lukmccall authored Apr 11, 2024
1 parent 49408ca commit afeba42
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class SafeAreaContextModule(reactContext: ReactApplicationContext?) :
return NAME
}

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

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

0 comments on commit afeba42

Please sign in to comment.