Why does Array.prototype.filter() throw an error in Magnolia JavaScript models?
问题 I'm attempting to filter a FreeMarker list in a Magnolia JavaScript model using Array.prototype.filter(). List [#assign list = [1, 2, 3]] Model var Model = function() { this.filterList = function(list) { return list.filter(function(item) { return item === 2 }); } }; new Model(); Usage ${model.filterList(list)} However, I get the following error. Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: list.filter is not a function Nashorn was implemented using ECMAScript-262 5.1. The