bigskysoftware / bigskysoftware/_hyperscript
Bug: Make `add` command safe for null values
- Lingua principale
- JavaScript
- Stelle
- 3.8k
- Fork
- 172
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
It seems like the `add` command does not accept null values, as in, I cannot say `add [@attribute=true] to `
Here's my example case: I have this hyperscript statement in a behavior
```hyperscript
add [@type="button"] to in me
```
In HTML, if this behavior is called on a node that does not contain any buttons, this breaks, complaining that ` in me` evaluates to null.
I think there are already other workarounds to use for this, for instance, the `tell` command should handle this better. But it would be nice for `add` to handle this gracefully, too.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia individuando l’implementazione del comando `add` e i test per i comandi che ricevono valori null. Riproduci il comportamento mostrato con un target `` mancante, confrontalo con la gestione del comando `tell` e conferma che `add` non si interrompa più quando il suo target restituisce null.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100