bigskysoftware / bigskysoftware/_hyperscript

Bug: Make `add` command safe for null values

オープン
#269 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
3.8k
フォーク
171
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、`add` コマンドの実装と、null 値を受け取るコマンドのテストを見つけます。`` ターゲットがない場合に示されている動作を再現し、`tell` コマンドの処理と比較して、ターゲットの評価結果が null になっても `add` が壊れなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。