Fixed a bug with $.map() and undefined values.