Skip to content

Commit 2fb6a7a

Browse files
authored
Update close-playground.js
1 parent 7db548a commit 2fb6a7a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fern/assets/close-playground.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ document.addEventListener('click', function () {
1111
}
1212
}
1313

14-
const fernHeaderButtons = document.querySelectorAll('.fern-header-container button');
14+
const playgroundEndpoint = document.querySelector('.fern-header-container .fern-button');
15+
fernHeaderButtons.forEach(button => {
16+
button.addEventListener('click', function () {
17+
if (isPlaygroundEndpointButtonVisible()) {
18+
clickPlaygroundEndpointButton();
19+
}
20+
});
21+
});
22+
23+
const fernHeaderButtons = document.querySelectorAll('.fern-header .fern-button');
1524
fernHeaderButtons.forEach(button => {
1625
button.addEventListener('click', function () {
1726
if (isPlaygroundEndpointButtonVisible()) {

0 commit comments

Comments
 (0)