File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -736,8 +736,13 @@ if (typeof global.process === 'undefined')
736736 let query = this . $queryTextsIndexed [ this . options . queryFormat ] . val ( ) ;
737737 if ( this . options . queryFormat === 'sparql' ) {
738738 // Add pre-defined prefixes to query and remove duplicates
739- const parsedQuery = new SparqlParser ( { prefixes :this . options . prefixes , sparqlStar : true } ) . parse ( query ) ;
740- query = new SparqlGenerator ( { } ) . stringify ( parsedQuery ) ;
739+ try {
740+ const parsedQuery = new SparqlParser ( { prefixes : this . options . prefixes , sparqlStar : true } ) . parse ( query ) ;
741+ query = new SparqlGenerator ( { } ) . stringify ( parsedQuery ) ;
742+ }
743+ catch {
744+ // Ignore parsing errors, as they will be caught later by the query engine
745+ }
741746 }
742747
743748 this . _queryWorker . postMessage ( {
You can’t perform that action at this time.
0 commit comments