[core][js] fix wrong filter (was Array comprehension)