Known Issues
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
This guide addresses a known issues in the Pepperi JS Client Side API Rule Engine.
Problem: The Rule Engine currently does not support the Optional Chaining Operator (?.).
Impact: Using this operator, such as x?.success
, may cause errors in UDFs, stopping script execution.
Recommendation: Avoid using the Optional Chaining Operator in Rule Engine scripts.
let x = pepperi.api.userDefinedTables.getList({});
let data = x?.success ? x.objects : []; // This will cause an error
let x = pepperi.api.userDefinedTables.getList({});
let data= x && x.success ? x.objects : []; // Safe alternative
Explanation: The workaround uses a conditional check (x && x.success
) to safely access x.objects
, defaulting to an empty array the condition fails.