@tinacms/search 1.0.11 → 1.0.13

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.
@@ -80,7 +80,7 @@
80
80
  data["_id"] = `${collection.name}:${relPath}`;
81
81
  data["_relativePath"] = relPath;
82
82
  }
83
- for (const f of collection.fields || (field == null ? void 0 : field.fields) || []) {
83
+ for (const f of (field == null ? void 0 : field.fields) || collection.fields || []) {
84
84
  if (!f.searchable) {
85
85
  delete data[f.name];
86
86
  continue;
@@ -60,7 +60,7 @@ const processDocumentForIndexing = (data, path, collection, textIndexLength, fie
60
60
  data["_id"] = `${collection.name}:${relPath}`;
61
61
  data["_relativePath"] = relPath;
62
62
  }
63
- for (const f of collection.fields || (field == null ? void 0 : field.fields) || []) {
63
+ for (const f of (field == null ? void 0 : field.fields) || collection.fields || []) {
64
64
  if (!f.searchable) {
65
65
  delete data[f.name];
66
66
  continue;
package/dist/index.js CHANGED
@@ -99,7 +99,7 @@ var processDocumentForIndexing = (data, path, collection, textIndexLength, field
99
99
  data["_id"] = `${collection.name}:${relPath}`;
100
100
  data["_relativePath"] = relPath;
101
101
  }
102
- for (const f of collection.fields || (field == null ? void 0 : field.fields) || []) {
102
+ for (const f of (field == null ? void 0 : field.fields) || collection.fields || []) {
103
103
  if (!f.searchable) {
104
104
  delete data[f.name];
105
105
  continue;
@@ -183,9 +183,7 @@ var SearchIndexer = class {
183
183
  }
184
184
  makeIndexerCallback(itemCallback) {
185
185
  return async (collection, contentPaths) => {
186
- const templateInfo = await this.schema.getTemplatesForCollectable(
187
- collection
188
- );
186
+ const templateInfo = this.schema.getTemplatesForCollectable(collection);
189
187
  await (0, import_graphql.sequential)(contentPaths, async (path) => {
190
188
  const data = await (0, import_graphql.transformDocumentIntoPayload)(
191
189
  `${collection.path}/${path}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/search",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index-client.mjs",
6
6
  "typings": "dist/index.d.ts",
@@ -29,8 +29,8 @@
29
29
  ]
30
30
  },
31
31
  "dependencies": {
32
- "@tinacms/graphql": "1.4.26",
33
- "@tinacms/schema-tools": "1.4.12",
32
+ "@tinacms/graphql": "1.4.28",
33
+ "@tinacms/schema-tools": "1.4.13",
34
34
  "abstract-level": "^1.0.3",
35
35
  "memory-level": "^1.0.0",
36
36
  "module-error": "^1.0.2",