Skip to content

Commit

Permalink
fix: apply resultSourceMap parameter only to queries
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed May 12, 2023
1 parent 435382d commit 1396414
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/data/dataMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,11 @@ export function _requestObservable<R>(
options.query = {tag: validate.requestTag(tag), ...options.query}
}

if (config.resultSourceMap) {
options.query = {resultSourceMap: true, ...options.query}
// GROQ query-only parameters
if (['GET', 'HEAD'].indexOf(options.method || 'GET') >= 0 && uri.indexOf('/data/query/') === 0) {
if (config.resultSourceMap) {
options.query = {resultSourceMap: true, ...options.query}
}
}

const reqOptions = requestOptions(
Expand Down

0 comments on commit 1396414

Please sign in to comment.