mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
dont split a string
This commit is contained in:
parent
f712b76ccf
commit
a5c7f261c8
@ -92,7 +92,11 @@ export class HaConversationTrigger
|
|||||||
|
|
||||||
private async _updateOption(ev: Event) {
|
private async _updateOption(ev: Event) {
|
||||||
const index = (ev.target as any).index;
|
const index = (ev.target as any).index;
|
||||||
const command = [...this.trigger.command];
|
const command = [
|
||||||
|
...(Array.isArray(this.trigger.command)
|
||||||
|
? this.trigger.command
|
||||||
|
: [this.trigger.command]),
|
||||||
|
];
|
||||||
command.splice(index, 1, (ev.target as HaTextField).value);
|
command.splice(index, 1, (ev.target as HaTextField).value);
|
||||||
fireEvent(this, "value-changed", {
|
fireEvent(this, "value-changed", {
|
||||||
value: { ...this.trigger, command },
|
value: { ...this.trigger, command },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user