<@U0BJHDX1Q> <@U01EY27APNH>.. I am working on a 20...
# adobe
j
@priyank_adobe @Mark Takata (Adobe).. I am working on a 2018 to 2021 upgrade and it appears this code example throws the following error on 2021 but not on 2018.
java.lang.NullPointerException at coldfusion.compiler.SemanticAnalyzer.createInitializerStatementforColon
Copy code
arr = [
  { name:"John" },
  { name:"Jane" }
];

value = arr.find( a => a.name == "John" ) ? arr.filter( a => a.name == "John" )[1] : {};

writeDump( value );
It will not error if changed to the following, so it appears the issue is introduced with the brackets.
Copy code
value = arr.find( a => a.name == "John" ) ? arr.filter( a => a.name == "John" ).first() : {};