diff options
author | przemyslawpluta <przemekpluta@hotmail.com> | 2015-11-25 19:51:00 +0000 |
---|---|---|
committer | przemyslawpluta <przemekpluta@hotmail.com> | 2015-11-25 19:51:00 +0000 |
commit | 102c420963b2e446eac19815e55b4987055d2ed7 (patch) | |
tree | 0e2a91a7e407b98f40af228e1f9f75ff88e3e457 /lib | |
parent | 0fedc1f10c4d5b9cb020e25c6e8440e31a7d1dd2 (diff) | |
download | mongo-edu-102c420963b2e446eac19815e55b4987055d2ed7.zip |
fix handouts download
version bump
Diffstat (limited to 'lib')
-rw-r--r-- | lib/login.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/login.js b/lib/login.js index 29ab9a3..fb0e81b 100644 --- a/lib/login.js +++ b/lib/login.js @@ -181,10 +181,14 @@ module.exports = { } else { $('tbody tr').map(function map(i, item) { - var current = $(item), text = current.children().first().text(), href = $(current.find('a')).attr('href'); - if (href) { - list.push({ name: text, value: host + $(current.find('a')).attr('href') }); - } + var current = $(item), + text = current.children().first().text(), + href = $(current.children().last().find('a')).attr('href'); + + if (text) { text = text.trim(); } + + if (href) { list.push({ name: text, value: host + href }); } + }); if (list.length) { list.unshift({name: 'All', value: 'all', checked: true}, {name: 'Cancel', value: 'cancel'}); } |