Protect against non functions being passed to close callback (#3019)

This commit is contained in:
Eric Bailey 2024-02-28 13:27:54 -06:00 committed by GitHub
parent 0c3d55db6f
commit d2c6edacb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 12 deletions

View file

@ -114,7 +114,7 @@ export function AdultContentEnabledPref({
</Trans>
</Prompt.Description>
<Prompt.Actions>
<Prompt.Action onPress={prompt.close}>OK</Prompt.Action>
<Prompt.Action onPress={() => prompt.close()}>OK</Prompt.Action>
</Prompt.Actions>
</Prompt.Outer>
</>