diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
index ed767acd05da..950409c43479 100644
--- a/site/layouts/partials/scripts.html
+++ b/site/layouts/partials/scripts.html
@@ -28,10 +28,7 @@
const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML
// Get extra classes for this example except '.bd-example'
- const classes = event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList
- if (classes) {
- classes.remove('bd-example')
- }
+ const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).filter(x => x !== 'bd-example').join(' ')
const jsSnippet = event.target.closest('.bd-code-snippet').querySelector('.btn-edit').getAttribute('data-js-snippet')
StackBlitzSDK.openBootstrapSnippet(htmlSnippet, jsSnippet, classes)