bigskysoftware / bigskysoftware/_hyperscript

Bug: Make `add` command safe for null values

Open
#269 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.