* Extract updatedInput from a permission result, falling back to the original input. * Handles the case where some PermissionResult variants don't have updatedInput.
( permissionResult: PermissionResult, fallback: Record<string, unknown>, )
| 1481 | * Handles the case where some PermissionResult variants don't have updatedInput. |
| 1482 | */ |
| 1483 | function getUpdatedInputOrFallback( |
| 1484 | permissionResult: PermissionResult, |
| 1485 | fallback: Record<string, unknown>, |
| 1486 | ): Record<string, unknown> { |
| 1487 | return ( |
| 1488 | ('updatedInput' in permissionResult |
| 1489 | ? permissionResult.updatedInput |
| 1490 | : undefined) ?? fallback |
| 1491 | ) |
| 1492 | } |
no outgoing calls
no test coverage detected