aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services/indexsearch.ts
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/services/indexsearch.ts')
-rw-r--r--viewer/src/services/indexsearch.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/viewer/src/services/indexsearch.ts b/viewer/src/services/indexsearch.ts
index e6d7eed..00f8cfc 100644
--- a/viewer/src/services/indexsearch.ts
+++ b/viewer/src/services/indexsearch.ts
@@ -29,7 +29,7 @@ export default class IndexSearch {
29 } 29 }
30 30
31 private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation { 31 private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation {
32 let byOperation: Tag.SearchByOperation = {}; 32 const byOperation: Tag.SearchByOperation = {};
33 Object.values(Operation).forEach( 33 Object.values(Operation).forEach(
34 operation => (byOperation[operation] = searchTags.filter(tag => tag.operation === operation)) 34 operation => (byOperation[operation] = searchTags.filter(tag => tag.operation === operation))
35 ); 35 );
@@ -37,7 +37,7 @@ export default class IndexSearch {
37 } 37 }
38 38
39 private static extractIntersection(byOperation: Tag.SearchByOperation): Set<Gallery.Item> { 39 private static extractIntersection(byOperation: Tag.SearchByOperation): Set<Gallery.Item> {
40 let intersection = new Set<Gallery.Item>(); 40 const intersection = new Set<Gallery.Item>();
41 if (byOperation[Operation.INTERSECTION].length > 0) { 41 if (byOperation[Operation.INTERSECTION].length > 0) {
42 byOperation[Operation.INTERSECTION] 42 byOperation[Operation.INTERSECTION]
43 .map(tag => tag.items) 43 .map(tag => tag.items)
@@ -49,7 +49,7 @@ export default class IndexSearch {
49 } 49 }
50 50
51 private static extractSubstraction(byOperation: Tag.SearchByOperation): Set<Gallery.Item> { 51 private static extractSubstraction(byOperation: Tag.SearchByOperation): Set<Gallery.Item> {
52 let substraction = new Set<Gallery.Item>(); 52 const substraction = new Set<Gallery.Item>();
53 if (byOperation[Operation.SUBSTRACTION].length > 0) { 53 if (byOperation[Operation.SUBSTRACTION].length > 0) {
54 byOperation[Operation.SUBSTRACTION].flatMap(tag => tag.items).forEach(item => substraction.add(item)); 54 byOperation[Operation.SUBSTRACTION].flatMap(tag => tag.items).forEach(item => substraction.add(item));
55 } 55 }