bigskysoftware / bigskysoftware/_hyperscript
Bug: Make `add` command safe for null values
- Lenguaje dominante
- JavaScript
- Estrellas
- 3.8k
- Forks
- 172
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza localizando la implementación del comando `add` y las pruebas de los comandos que reciben valores null. Reproduce el comportamiento mostrado con un destino `` ausente, compáralo con el tratamiento del comando `tell` y confirma que `add` ya no falla cuando su destino se evalúa como null.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100