Skip to content

Commit

Permalink
fix: fix minor bug with index replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
anfibiacreativa committed Oct 30, 2023
1 parent bb0baf3 commit 3ea28cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/chat-component/src/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const mainStyle = css`
}
.chat__container {
min-width: 100%;
min-height: 400px;
transition: width 0.3s ease-in-out;
max-height: 100vh;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/chat-component/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function processText(inputText: string, arrays: Array<Array<string> | Arr
// from the response answer
const stepsIndex = replacedText.indexOf('s:');
// eslint-disable-next-line unicorn/no-negated-condition, unicorn/prefer-string-slice
replacedText = stepsIndex !== -1 ? inputText.substring(0, stepsIndex + 4) : inputText;
replacedText = stepsIndex !== -1 ? inputText.substring(0, stepsIndex + 6) : inputText;

arrays[2] = nextQuestions;
return { replacedText, arrays };
Expand Down

0 comments on commit 3ea28cd

Please sign in to comment.