Skip to content

Commit

Permalink
Merge pull request #44 from tmayoff/shoppinh_list_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tmayoff committed Mar 2, 2024
2 parents 1cfc74d + 5a2e5b2 commit 0577867
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/meal_plan/shopping_list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App, TFile, type Pos } from 'obsidian';
import { App, TFile } from 'obsidian';
import { get } from 'svelte/store';
import { settings } from '../settings';
import { get_current_week } from './utils';
Expand Down Expand Up @@ -84,7 +84,7 @@ function get_ingredients(app: App, file: TFile) {

let end = -1;
if (topLevel.length > 1) {
let end = topLevel.findIndex((h) => {
end = topLevel.findIndex((h) => {
return h.level === 1 && h.heading.contains(this_week);
});
if (end < topLevel.length - 1) {
Expand All @@ -93,7 +93,7 @@ function get_ingredients(app: App, file: TFile) {
}

const startPos = topLevel[0].position!;
const endPos = end != -1 ? topLevel[end]?.position! : null;
const endPos = end !== -1 ? topLevel[end]?.position! : null;

const links = fileCache.links!;
const ignore_list = get(settings).shopping_list_ignore;
Expand Down

0 comments on commit 0577867

Please sign in to comment.