Site. Fixed an error in javascript when the page does not have a tag with the .documentation-version__button class.
This commit is contained in:
parent
b33362a235
commit
707762d29b
@ -1,8 +1,10 @@
|
|||||||
let blockDocumentationVersion = document.querySelector('#documentation-version');
|
let blockDocumentationVersion = document.querySelector('#documentation-version');
|
||||||
blockDocumentationVersion.querySelector('.documentation-version__button').addEventListener('click', (e) => {
|
if (blockDocumentationVersion) {
|
||||||
if (blockDocumentationVersion.classList.contains('active')) {
|
blockDocumentationVersion.querySelector('.documentation-version__button').addEventListener('click', (e) => {
|
||||||
blockDocumentationVersion.classList.remove('active');
|
if (blockDocumentationVersion.classList.contains('active')) {
|
||||||
} else {
|
blockDocumentationVersion.classList.remove('active');
|
||||||
blockDocumentationVersion.classList.add('active');
|
} else {
|
||||||
}
|
blockDocumentationVersion.classList.add('active');
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user