File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,7 @@ Graphs.prototype.sparql = function queryGraphSPARQL() {
607607
608608 // TODO: collection, directory?
609609
610+ // Single configuration object
610611 if ( argLen === 1 ) {
611612 var params = args [ 0 ] ;
612613 acceptType = params . contentType ;
@@ -626,9 +627,11 @@ Graphs.prototype.sparql = function queryGraphSPARQL() {
626627 if ( ( acceptType == null ) || ( query == null ) ) {
627628 throw new Error ( 'named parameters must specify content type and query for SPARQL query on graphs' ) ;
628629 }
629- } else {
630+ }
631+ // Multiple params
632+ else {
630633 acceptType = args [ 0 ] ;
631- if ( argLen > 3 ) {
634+ if ( argLen >= 3 ) {
632635 defaultGraphs = Array . prototype . slice . call ( arguments , 1 , argLen - 1 ) ;
633636 }
634637 query = args [ argLen - 1 ] ;
You can’t perform that action at this time.
0 commit comments