summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2015-11-25 19:51:00 +0000
committerprzemyslawpluta <przemekpluta@hotmail.com>2015-11-25 19:51:00 +0000
commit102c420963b2e446eac19815e55b4987055d2ed7 (patch)
tree0e2a91a7e407b98f40af228e1f9f75ff88e3e457 /lib
parent0fedc1f10c4d5b9cb020e25c6e8440e31a7d1dd2 (diff)
downloadmongo-edu-102c420963b2e446eac19815e55b4987055d2ed7.zip
fix handouts download
version bump
Diffstat (limited to 'lib')
-rw-r--r--lib/login.js12
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'}); }