Skip to content

Commit

Permalink
fix(source): wrong handling error with file
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux authored and zarov committed Feb 7, 2019
1 parent e1c96c2 commit a558e2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Source/FileSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ function fileParser(text) {
} else if (file.documentElement.tagName.toLowerCase() === 'parsererror') {
throw new Error('Error parsing XML document');
} else {
throw new Error('Unsupported xml file, only valid KML and GPX are supported, but no <gpx> or <kml> tag found.',
file);
throw new Error('Unsupported xml file, only valid KML and GPX are supported, but no <gpx> or <kml> tag found.');
}
} else if (trimmedText.startsWith('{') || trimmedText.startsWith('[')) {
parsedFile = JSON.parse(text);
Expand Down

0 comments on commit a558e2e

Please sign in to comment.