fix(components): Fix copy button copies outdated snippet

https://github.com/storybookjs/storybook/issues/18829

Fixed a regression introduced in 5f5cf81060afb6124b1f2382accbe2b2e7a47003.

`highlightableCode` was missing in dependencies array therefore
the copied code snippet was fixed to the first-rendered one.
This commit is contained in:
Shota Fuji 2022-08-08 12:51:42 +00:00
parent c8bcbeb510
commit 9783a08a8f
No known key found for this signature in database
GPG Key ID: 9C4BB9069532AF67

View File

@ -177,7 +177,7 @@ export const SyntaxHighlighter: FC<SyntaxHighlighterProps> = ({
})
.catch(logger.error);
},
[]
[highlightableCode]
);
return (