bowtie-json-schema / bowtie

JSON Schema in every programming language

Home Page:https://bowtie.report/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clipboard button on an empty instance copies `undefined`

SimonDMC opened this issue · comments

Clicking the "Copy to clipboard" button on an empty instance copies the literal string undefined.

bowtie-undefined.mp4

I'd say the best way to fix this is to not render the Clipboard button at all whenever the instance is empty - it seems redundant in that case.

Happy to work on this once accepted.

I'd say the best way to fix this is to not render the Clipboard button at all whenever the instance is empty - it seems redundant in that case.

I think an alternate fix which probably makes sense for other reasons might be to simply auto-select the first test when opened!

And yes feel free to grab this one, thanks for filing!