karma preprocessor is a map not array, fixed for undefined cases