* 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>, )
| 1475 | * Handles the case where some PermissionResult variants don't have updatedInput. |
| 1476 | */ |
| 1477 | function getUpdatedInputOrFallback( |
| 1478 | permissionResult: PermissionResult, |
| 1479 | fallback: Record<string, unknown>, |
| 1480 | ): Record<string, unknown> { |
| 1481 | return ( |
| 1482 | ('updatedInput' in permissionResult |
| 1483 | ? permissionResult.updatedInput |
| 1484 | : undefined) ?? fallback |
| 1485 | ) |
| 1486 | } |
| 1487 |
no outgoing calls
no test coverage detected