mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 13:53:48 +01:00
Fix error for "Unknow set" (when DOI is not defined in data file)
This commit is contained in:
parent
72c81981e8
commit
cdb5f5978c
@ -215,6 +215,7 @@ draft: false
|
|||||||
selects.each(function() {
|
selects.each(function() {
|
||||||
AllValsCache.set(this.name,getAllVals(this))
|
AllValsCache.set(this.name,getAllVals(this))
|
||||||
})
|
})
|
||||||
|
|
||||||
var AAllValsCache = Array.from(AllValsCache)
|
var AAllValsCache = Array.from(AllValsCache)
|
||||||
var vals = uniq(window.dats.filter(d => {
|
var vals = uniq(window.dats.filter(d => {
|
||||||
return AAllValsCache.every(([k,v]) => {
|
return AAllValsCache.every(([k,v]) => {
|
||||||
@ -233,6 +234,10 @@ draft: false
|
|||||||
if (name === "DOI") {
|
if (name === "DOI") {
|
||||||
let newvals = []
|
let newvals = []
|
||||||
for (const val of vals) {
|
for (const val of vals) {
|
||||||
|
if (val==="") {
|
||||||
|
newvals.push([""])
|
||||||
|
}
|
||||||
|
else {
|
||||||
for (const set of publis.sets.values()) {
|
for (const set of publis.sets.values()) {
|
||||||
if (set.includes(val)) {
|
if (set.includes(val)) {
|
||||||
if (!newvals.some(v=>JSON.stringify(v)===JSON.stringify(set))) {
|
if (!newvals.some(v=>JSON.stringify(v)===JSON.stringify(set))) {
|
||||||
@ -241,6 +246,7 @@ draft: false
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
vals = newvals
|
vals = newvals
|
||||||
}
|
}
|
||||||
textSelctor = function (value) {
|
textSelctor = function (value) {
|
||||||
|
@ -27,7 +27,7 @@ class publiDB {
|
|||||||
return setname
|
return setname
|
||||||
}
|
}
|
||||||
if (supportUnknow && doi === "") {
|
if (supportUnknow && doi === "") {
|
||||||
return UnknowSetName
|
return publiDB.UnknowSetName
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user