diff options
| author | adamhrv <adam@ahprojects.com> | 2019-03-08 21:56:41 +0100 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2019-03-08 21:56:41 +0100 |
| commit | 69c4157f599846173362d2a450f58b5f58c0d8d8 (patch) | |
| tree | 342e4e295820f6daaa130032fdb10bdf4ee1f2b7 /client/index.js | |
| parent | 5bcbb24791062b6524c06e2bf2bd4a61965ba6e8 (diff) | |
| parent | 377279bd1fb43d8752f7a664fe0f5c2ae20c0bc3 (diff) | |
Merge branch 'master' of github.com:adamhrv/megapixels_dev
Diffstat (limited to 'client/index.js')
| -rw-r--r-- | client/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/index.js b/client/index.js index 1e4e2eb8..dd60c0ed 100644 --- a/client/index.js +++ b/client/index.js @@ -80,17 +80,17 @@ 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 + console.log('not on a dataset page') + return [el, payload] } } payload.dataset = dataset |
