update jsonpath for csp fix
This commit is contained in:
@@ -127,11 +127,19 @@ let BuildCheckSection = (props) => {
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup);
|
||||
let formObj = jsonpath({
|
||||
path: "$['" + appealtypes + "']",
|
||||
json: fieldLookup,
|
||||
sandbox: {},
|
||||
});
|
||||
|
||||
let labelTrans =
|
||||
router.locale == "cy"
|
||||
? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj)
|
||||
? jsonpath({
|
||||
path: '$..[?(@.value=="' + label + '")].value_cy',
|
||||
json: formObj,
|
||||
sandbox: {},
|
||||
})
|
||||
: label;
|
||||
return labelTrans;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user