mirror of
https://github.com/tale/headplane.git
synced 2026-08-18 09:03:14 +00:00
fix: join copied commands without a space
This commit is contained in:
@@ -24,9 +24,7 @@ export default function Code({ isCopyable, children, className }: CodeProps) {
|
|||||||
type="button"
|
type="button"
|
||||||
className="bottom-0 right-0 absolute"
|
className="bottom-0 right-0 absolute"
|
||||||
onClick={async (event) => {
|
onClick={async (event) => {
|
||||||
const text = Array.isArray(children)
|
const text = Array.isArray(children) ? children.join('') : children;
|
||||||
? children.join(' ')
|
|
||||||
: children;
|
|
||||||
|
|
||||||
const svgs = event.currentTarget.querySelectorAll('svg');
|
const svgs = event.currentTarget.querySelectorAll('svg');
|
||||||
for (const svg of svgs) {
|
for (const svg of svgs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user