Tolerate zero-length array returns in wrapped JS