Hide downloads section of sidebar for apps with no downloads #1221

Co-authored-by:Nhori Lopchan Tamang <nlopchantamang@hubspot.com>
Co-authored-by:Ashley Zeldin <ashley.zeldin@gmail.com>
This commit is contained in:
Nhori Lopchan Tamang 2018-08-03 13:46:06 -04:00
Родитель b2c361cd4e
Коммит a839c6472b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -5,7 +5,6 @@ const {getPlatformFromUserAgent, getPlatformLabel} = require('platform-utils')
module.exports = function updateAppDownloadLinks () {
const links = Array.from(document.querySelectorAll('a.app-download'))
// No downloads links found on the page.
if (!links.length) return
@ -15,6 +14,7 @@ module.exports = function updateAppDownloadLinks () {
if (!matches.length) {
// No downloads found for the detected OS, probably android/ios
// Hide all links and let them click view all files if wanted
links[0].parentNode.style.display = 'none'
}
links.forEach(link => {