diff --git a/.babelrc b/.babelrc index 24988a717fa93a7f1935275134383671d2dbf7e0..7c82a441ac5b94d88fcf45079af786da4b3aa017 100755 --- a/.babelrc +++ b/.babelrc @@ -7,6 +7,7 @@ "presets": ["env", "react", "stage-2"] }, "test": { + "presets": ["env"] } } } \ No newline at end of file diff --git a/app/components/App.jsx b/app/components/App.jsx index 2a9885f3dedf2dc1696e7fd03c06a3dd8b3128a8..3cfac61024149db620bf2adee9668bf6668ebeed 100755 --- a/app/components/App.jsx +++ b/app/components/App.jsx @@ -97,10 +97,13 @@ const RightSection = styled.div` } @media screen and (min-width: 901px) { &.hidden { - display: none !important; + display: flex !important; } } @media screen and (max-width: 900px) { + &.hidden { + display: none !important; + } flex-direction: column; width: 100%; height: auto; diff --git a/app/components/citation-search/PubMedSearch.jsx b/app/components/citation-search/PubMedSearch.jsx index e711684d6e29510978e5fb91f8f33641c9b21968..11b5b86906e6be3f4c6afcca582ed12a488fb9e0 100755 --- a/app/components/citation-search/PubMedSearch.jsx +++ b/app/components/citation-search/PubMedSearch.jsx @@ -204,16 +204,18 @@ class PubMedSearch extends React.Component { async onSelected(result, journal) { const inPMC = result.articleids.find(id => id.idtype === 'pmc') if (inPMC) { + this.setState({ loading: true }) const obj = { inPMC: result.title, pmcid: inPMC.value, + loading: false, } const epmcURL = `https://www.ebi.ac.uk/europepmc/webservices/rest/search?query=SRC:MED%20EXT_ID:${ result.uid }&resulttype=lite&format=json` const response = await fetch(epmcURL) const json = await response.json() - const epmc = json.resultList.result[0].inEPMC + const epmc = json.resultList.result[0] && json.resultList.result[0].inEPMC if (epmc === 'Y') { obj.inEPMC = true } diff --git a/app/components/dashboard/DashboardPage.jsx b/app/components/dashboard/DashboardPage.jsx index cd4d7aa54b1a45f444b3707c47b43c04ab7dee0b..ee2dcaeef2a075ff82c2fc7b481edd7ce79b93e0 100644 --- a/app/components/dashboard/DashboardPage.jsx +++ b/app/components/dashboard/DashboardPage.jsx @@ -163,7 +163,6 @@ const MyManuscripts = ({ currentUser, errors, history }) => { ? data.findByStatus : data - // continue here...style later!!! const toggles = togglesRequired && ( <React.Fragment> <ToggleBar> diff --git a/config/mailer.js b/config/mailer.js index 107575f8bb66f35d5592083affb782e35d74460a..26cd287be34654f9476acfd3af7b9e13d3be4645 100755 --- a/config/mailer.js +++ b/config/mailer.js @@ -1,6 +1,6 @@ module.exports = { transport: { - host: 'smtp.ebi.ac.uk', + host: 'outgoing.ebi.ac.uk', port: 25, }, } diff --git a/server/utils/files.js b/server/utils/files.js index 863d5b728af4f6c6c2f52c818fdfcd88ac7bd7b6..c9136971c1fc95fd71ab26fb5be6d278718416bb 100644 --- a/server/utils/files.js +++ b/server/utils/files.js @@ -14,11 +14,14 @@ module.exports.getManifestFilename = function getManifestFilename(tmpPath) { return new Promise((resolve, reject) => { fs.readdir(tmpPath, (err, items) => { if (err) reject(err) + let manifestExists = false for (let i = 0; i < items.length; i += 1) { if (items[i].indexOf('manifest') > -1) { resolve(items[i]) - } else reject(new Error('There is no manifest file.')) + manifestExists = true + } } + if (!manifestExists) reject(new Error('There is no manifest file.')) }) }) } diff --git a/server/utils/unTar.js b/server/utils/unTar.js index f8ef670c9dddbd0309029b36348d500e5f7be5ef..404280fc1116736e4ef0bd58f1bbc2278ba58cdd 100644 --- a/server/utils/unTar.js +++ b/server/utils/unTar.js @@ -15,9 +15,7 @@ module.exports.untar = function untar(source, dest) { } fs.readdir(dest, (err, items) => { if (err) reject(err) - // resolve(`${dest}/${items[0]}`) - // this works in beta: - resolve(`${dest}`) + resolve(`${dest}/${items[0]}`) }) }, )