Skip to content

Commit

Permalink
fix: apply resultSourceMap parameter only to queries (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored May 15, 2023
1 parent 7bd3a16 commit dac8ea6
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 dac8ea6

Please sign in to comment.