From ab94343cb47122f28174d2e5af08609a3ef3919a Mon Sep 17 00:00:00 2001 From: xwashere Date: Mon, 27 Nov 2023 10:41:13 -0500 Subject: [PATCH] fuck --- backend/templates/parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/templates/parser.ts b/backend/templates/parser.ts index e8c3734..0a94b43 100644 --- a/backend/templates/parser.ts +++ b/backend/templates/parser.ts @@ -186,8 +186,8 @@ export function prepareTemplate(src: string): TemplateOp { args: joined, srcRange: { file: file, - from: tokens[start].from, - to: tokens[pos - 1].to + from: tokens[Math.min(tokens.length - 1, start)].from, + to: tokens[Math.min(tokens.length, pos) - 1].to } }; }