Skip to content

Commit

Permalink
fix(custom text): limit being set to incorrect value when using pipe …
Browse files Browse the repository at this point in the history
…delimiter and simple text mode

!nuf
  • Loading branch information
Miodec committed Nov 25, 2024
1 parent edf71da commit 1141051
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/ts/modals/custom-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ function apply(): void {
CustomText.setPipeDelimiter(state.customTextPipeDelimiter);
CustomText.setText(text);

if (state.customTextLimits.word !== "") {
if (state.customTextMode === "simple" && state.customTextPipeDelimiter) {
CustomText.setLimitMode("section");
CustomText.setLimitValue(text.length);
} else if (state.customTextLimits.word !== "") {
CustomText.setLimitMode("word");
CustomText.setLimitValue(parseInt(state.customTextLimits.word));
} else if (state.customTextLimits.time !== "") {
Expand Down

0 comments on commit 1141051

Please sign in to comment.