(code: number, insecure: boolean)
| 43 | } |
| 44 | |
| 45 | export function geoErrorMessage(code: number, insecure: boolean): string { |
| 46 | if (code === PERMISSION_DENIED && insecure) { |
| 47 | return GEO_INSECURE_CONTEXT_MESSAGE; |
| 48 | } |
| 49 | if (code === PERMISSION_DENIED) { |
| 50 | return "Location permission denied"; |
| 51 | } |
| 52 | if (code === TIMEOUT) { |
| 53 | return "Location request timed out"; |
| 54 | } |
| 55 | return "Location unavailable"; |
| 56 | } |
no outgoing calls
no test coverage detected