Skip to content

Commit

Permalink
fix: JSON Path condition on reearth/core (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
keiya01 committed Mar 24, 2023
1 parent f1780fd commit 5f70245
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -34,15 +34,15 @@ export function replaceVariables(expression: string, feature?: any): [string, JP
return [result, []];
}
}
if (res.length == 1) {
if (res.length !== 0) {
const placeholderLiteral = generateRandomString(10);
literalJP.push({
literalName: placeholderLiteral,
literalValue: res[0],
});
result += placeholderLiteral;
} else {
return [result, []];
return ["false", []];
}
} else {
const replacedVarExp = replaceReservedWord(varExp);
Expand Down

0 comments on commit 5f70245

Please sign in to comment.