From 50d881ac70476c39418916f575c93a2f7825795a Mon Sep 17 00:00:00 2001 From: Christopher Henn Date: Thu, 25 Oct 2018 09:40:01 -0700 Subject: [PATCH] Fix infinite loop bug in Flux autocompletions --- ui/src/flux/helpers/autoComplete.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/flux/helpers/autoComplete.ts b/ui/src/flux/helpers/autoComplete.ts index 72b2619cc..316810fe2 100644 --- a/ui/src/flux/helpers/autoComplete.ts +++ b/ui/src/flux/helpers/autoComplete.ts @@ -152,8 +152,8 @@ const shouldCompleteParam = (currentLineText, cursorPosition) => { let i = cursorPosition while (i) { - const char = currentLineText[i] - const charBefore = currentLineText[i - 1] + const char = currentLineText[i - 1] + const charBefore = currentLineText[i - 2] if (char === ':' || char === '>' || char === ')') { return false