summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-03-08 20:51:11 +0100
committerJules Laplace <julescarbon@gmail.com>2019-03-08 20:51:11 +0100
commit1b086936a927aed44e505b12239c78fefa1e058c (patch)
tree2438609c973c4a3e791509bb30d9ac6827950b0b /client/index.js
parente6c50e5550275b8e9d2245201c77c6f9fef7a11a (diff)
chart!
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/index.js b/client/index.js
index 1e4e2eb8..87214925 100644
--- a/client/index.js
+++ b/client/index.js
@@ -80,14 +80,14 @@ function runApplets() {
url = null
}
}
- if (('datasets' in payload) && !dataset && !url) {
+ if ((('datasets' in payload) && !dataset && !url) || window.location.pathname.match('datasets')) {
const path = window.location.pathname.split('/').filter(s => !!s)
- if (path.length) {
+ if (path.length > 1) {
dataset = path.pop()
if (dataset === 'index.html') {
dataset = path.pop()
}
- // console.log('dataset from path:', dataset)
+ console.log('dataset from path:', dataset)
} else {
console.log('couldnt determine citations dataset')
return null