aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-15 15:29:45 -0400
committerbobzel <zzzman@gmail.com>2020-10-15 15:29:45 -0400
commit79b1ae37d4a89130026a33d52139a69fbe444698 (patch)
treef4b3cc945940bc3a1b10894b33adcf13bc004487 /src/client/documents/Documents.ts
parent9ebb6c94f35c7d53b0bb4e9842784e99d3b28c07 (diff)
fixed warnings
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 159771145..45c465d84 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -895,8 +895,8 @@ export namespace Docs {
export namespace DocUtils {
export function Excluded(d: Doc, docFilters: string[]) {
const filterFacets: { [key: string]: { [value: string]: string } } = {}; // maps each filter key to an object with value=>modifier fields
- for (let i = 0; i < docFilters.length; i++) {
- const fields = docFilters[i].split(":");
+ docFilters.forEach(filter => {
+ const fields = filter.split(":");
const key = fields[0];
const value = fields[1];
const modifiers = fields[2];
@@ -904,7 +904,7 @@ export namespace DocUtils {
filterFacets[key] = {};
}
filterFacets[key][value] = modifiers;
- }
+ });
if (d.z) return false;
for (const facetKey of Object.keys(filterFacets)) {
@@ -921,8 +921,8 @@ export namespace DocUtils {
const childDocs = viewSpecScript ? docs.filter(d => viewSpecScript.script.run({ doc: d }, console.log).result) : docs;
const filterFacets: { [key: string]: { [value: string]: string } } = {}; // maps each filter key to an object with value=>modifier fields
- for (let i = 0; i < docFilters.length; i++) {
- const fields = docFilters[i].split(":");
+ docFilters.forEach(filter => {
+ const fields = filter.split(":");
const key = fields[0];
const value = fields[1];
const modifiers = fields[2];
@@ -930,7 +930,7 @@ export namespace DocUtils {
filterFacets[key] = {};
}
filterFacets[key][value] = modifiers;
- }
+ });
const filteredDocs = docFilters.length ? childDocs.filter(d => {
if (d.z) return true;