We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e93f09b commit 738358cCopy full SHA for 738358c
1 file changed
src/components/documentation/CodeBlock/CodeBlock.astro
@@ -12,7 +12,7 @@ const { code, language = 'text', title } = Astro.props;
12
<script>
13
document.querySelectorAll<HTMLButtonElement>('.copy-code').forEach((button) => {
14
button.addEventListener('click', async () => {
15
- const code = button.dataset.code ?? '';
+ const code = button.dataset['code'] ?? '';
16
try {
17
await navigator.clipboard.writeText(code);
18
button.textContent = 'Copied';
0 commit comments