Remove -> prefix if no element is selected yet

This commit is contained in:
Jan Böhmer 2024-08-24 15:35:30 +02:00
parent f6577a8f33
commit f18c024daa

View file

@ -66,6 +66,9 @@ export default class extends Controller {
//Prepend it to the input
if (current) {
data.input = current + " " + data.input;
} else {
//If there is no current value, we remove the "->"
data.input = data.input.substring(2);
}
}
@ -96,6 +99,9 @@ export default class extends Controller {
//Prepend it to the input
if (current) {
input = current + " " + input;
} else {
//If there is no current value, we remove the "->"
input = input.substring(2);
}
}