add empty variables to json seafile
This commit is contained in:
parent
116d990cb7
commit
2458d6f2f5
@ -42,7 +42,14 @@ if(url !== null) {
|
|||||||
}
|
}
|
||||||
for(let i=0; i<props.length; i++) {
|
for(let i=0; i<props.length; i++) {
|
||||||
const prop = props[i];
|
const prop = props[i];
|
||||||
if((prop.key.type === "Identifier") && (prop.value.type === "Literal") && (prop.value.value != "")) {
|
if((prop.key.type === "Identifier") && (prop.value.type === "Literal")) {
|
||||||
|
data[prop.key.name] = prop.value.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(let i=0; i<props.length; i++) {
|
||||||
|
const prop = props[i];
|
||||||
|
const valid = (new Boolean(prop.value.value)).valueOf();
|
||||||
|
if((prop.key.type === "Identifier") && (prop.value.type === "Literal") && valid) {
|
||||||
data[prop.key.name] = prop.value.value;
|
data[prop.key.name] = prop.value.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user