Skip to content

Commit

Permalink
run validate
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoertl committed Jan 2, 2024
1 parent a5c4af6 commit 34a3623
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/composables/useKeywordInContextSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export function useKeywordInContextSearch() {
const keywordInContext = data.value as KeywordInContextData;
// console.log('keywordInContext', { keywordInContext: keywordInContext.value });
// eslint-disable require-atomic-updates
// @ts-ignore
/* eslint-disable-next-line */
query.data.keywordInContext = (keywordInContext.Lines || []).map(
({ Tbl_refs, Left, Kwic, toknum, Right }) => ({
// this mapping is directly taken from the ancient code
refs: Tbl_refs,
// date: Tbl_refs[1] ?? "",
// source: Tbl_refs[4] ?? "",
// region: Tbl_refs[2] ?? "",
date: Tbl_refs[1] ?? "",
source: Tbl_refs[4] ?? "",
region: Tbl_refs[2] ?? "",
left: Left.map(({ str }: { str: string }) => str).join(" "),
word: typeof Kwic[0] !== "undefined" ? Kwic[0].str : "",
right: Right.map(({ str }: { str: string }) => str).join(" "),
Expand Down
3 changes: 3 additions & 0 deletions src/composables/useYearlyFrequenciesSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export function useYearlyFrequenciesSearch() {
});
// console.log({ freqttYear: freqttYear.value });
const freqttYear = _freqttYear.value as YearlyFrequencyData;

/* eslint-disable-next-line */
const _yearlyData = freqttYear.Blocks ?? [];
// @ts-ignore
const yearlyData = _yearlyData[0]?.Items ?? [];
// console.log({ yearlyData, blocks: freqttYear.value.Blocks, items: freqttYear.value.Blocks[0].Items });
// console.log('data', query.data);
Expand Down

0 comments on commit 34a3623

Please sign in to comment.