Commit a3e41ee7 authored by minseok.park's avatar minseok.park

add check verions lenght logic

parent 1e4d5cda
Pipeline #19380 passed with stages
in 3 minutes
......@@ -6,8 +6,12 @@
var selector = document.querySelector('.page-versions')
var backdrop = document.querySelector('.backdrop')
var versionMenu = document.querySelector('.version-menu')
var versions = versionMenu?.querySelectorAll('.version')
toggle.addEventListener('click', function (e) {
if (!versions.length) return
selector.classList.toggle('is-active')
backdrop.classList.toggle('is-active')
e.stopPropagation() // trap event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment