Known compabillity issues when migrating Nashorn JavaScripts to Rhino:
var foo = false;
in the example below:
// Non-compatible Javascript that doesn't assign the variable foo a default
// value and that will cause "...Undefined" in the output if "someCheck" is false.
var foo;
if (someCheck) {
foo = 'Hello World!';
}
// Velocity template code
#if ($foo)
$foo
#end
// Resulting HTML when not setting foo to false
org.mozilla.javascript.Undefined@0