@sanity/client 6.6.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1092,7 +1092,7 @@ client.delete('image-abc123_someAssetId-500x500-png').then((result) => {
1092
1092
 
1093
1093
  ### Mutation options
1094
1094
 
1095
- The following options are available for mutations, and can be applied either as the second argument to `create()`, `createOrReplace`, `createIfNotExist`, `delete()` and `mutate()` - or as an argument to the `commit()` method on patches and transactions.
1095
+ The following options are available for mutations, and can be applied either as the second argument to `create()`, `createOrReplace`, `createIfNotExists`, `delete()` and `mutate()` - or as an argument to the `commit()` method on patches and transactions.
1096
1096
 
1097
1097
  - `visibility` (`'sync'|'async'|'deferred'`) - default `'sync'`
1098
1098
  - `sync`: request will not return until the requested changes are visible to subsequent queries.
@@ -972,9 +972,10 @@ function _requestObservable(client, httpRequest, options) {
972
972
  };
973
973
  }
974
974
  if (["GET", "HEAD", "POST"].indexOf(options.method || "GET") >= 0 && uri.indexOf("/data/query/") === 0) {
975
- if ((_a = options.resultSourceMap) != null ? _a : config.resultSourceMap) {
975
+ const resultSourceMap = (_a = options.resultSourceMap) != null ? _a : config.resultSourceMap;
976
+ if (resultSourceMap !== void 0 && resultSourceMap !== false) {
976
977
  options.query = {
977
- resultSourceMap: true,
978
+ resultSourceMap,
978
979
  ...options.query
979
980
  };
980
981
  }