set source to [] if undefined.