Skip to content

Commit 1d93c94

Browse files
committed
update open access button
1 parent 87385b8 commit 1d93c94

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dashMpComponents
22
Title: Dash components for the Materials Project
3-
Version: 0.4.39
3+
Version: 0.4.40
44
Description: Dash components for the Materials Project
55
Depends: R (>= 3.0.2)
66
Imports:

dash_mp_components/dash_mp_components.min.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246206,13 +246206,12 @@
246206246206
s ||
246207246207
c ||
246208246208
Rp()
246209-
.get(
246210-
`https://api.openaccessbutton.org/find?id=${a.doi}`
246211-
)
246209+
.get(`https://bg.api.oa.works/find?id=${a.doi}`)
246212246210
.then(e => {
246213-
if (!e.data.hasOwnProperty('url'))
246214-
throw new Error('No Open Access URL found');
246215-
A(e.data.url);
246211+
e.data.hasOwnProperty('url')
246212+
? A(e.data.url)
246213+
: (console.log('No Open Access URL found'),
246214+
l(!0));
246216246215
})
246217246216
.catch(e => {
246218246217
console.log(e), l(!0);
@@ -246313,10 +246312,11 @@
246313246312
{doi: r.doi, url: i},
246314246313
Kj(r.journal, r.year)
246315246314
),
246316-
o().createElement(qj, {
246317-
doi: r.doi,
246318-
url: r.openAccessUrl,
246319-
}),
246315+
!r.preventOpenAccessFetch &&
246316+
o().createElement(qj, {
246317+
doi: r.doi,
246318+
url: r.openAccessUrl,
246319+
}),
246320246320
o().createElement(Xj, {doi: r.doi})
246321246321
)
246322246322
)

dash_mp_components/dash_mp_components.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_mp_components/package-info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@materialsproject/dash-mp-components",
3-
"version": "0.4.39",
3+
"version": "0.4.40",
44
"description": "Dash components for the Materials Project",
55
"repository": {
66
"type": "git",
@@ -33,7 +33,7 @@
3333
"author": "Materials Project Team <[email protected]>",
3434
"license": "BSD",
3535
"dependencies": {
36-
"@materialsproject/mp-react-components": "0.3.7",
36+
"@materialsproject/mp-react-components": "0.3.8",
3737
"file-loader": "^5.1.0",
3838
"prettier": "^1.19.1",
3939
"process": "^0.11.10",

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"author": "Materials Project Team <[email protected]>",
3434
"license": "BSD",
3535
"dependencies": {
36-
"@materialsproject/mp-react-components": "0.3.7",
36+
"@materialsproject/mp-react-components": "0.3.8",
3737
"file-loader": "^5.1.0",
3838
"prettier": "^1.19.1",
3939
"process": "^0.11.10",

0 commit comments

Comments
 (0)