( redirectBase: string | URL, returnUrl: string | URL )
| 167 | * @returns A boolean indicating whether the paths are the same. |
| 168 | */ |
| 169 | export function haveSamePath( |
| 170 | redirectBase: string | URL, |
| 171 | returnUrl: string | URL |
| 172 | ) { |
| 173 | const base = new URL(redirectBase); |
| 174 | const url = new URL(returnUrl); |
| 175 | return base.pathname === url.pathname; |
| 176 | } |