Remove sync parseGpx, use parseGpxAsync everywhere
parseGpx (sync) needs browser DOMParser which doesn't exist on the server — it silently failed in every server-side caller. Removed the export and migrated all callers to parseGpxAsync. Updated tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d5bcecb345
commit
5f3d4ae846
5 changed files with 29 additions and 21 deletions
|
|
@ -15,7 +15,7 @@ async function getDOMParser(): Promise<typeof DOMParser> {
|
|||
return _LinkedDOMParser;
|
||||
}
|
||||
|
||||
export function parseGpx(xml: string): GpxData {
|
||||
function parseGpx(xml: string): GpxData {
|
||||
// Synchronous path for browser
|
||||
if (typeof DOMParser !== "undefined") {
|
||||
return parseGpxWithParser(new DOMParser(), xml);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue