Skip to content

Commit

Permalink
fix: optional option no longer trigger an error when omitted
Browse files Browse the repository at this point in the history
The `coverageReporter.instrumenter` object can be passed to the karma
configuration to override the automatic instrumenters inferring (since this
[PR]). However, when the `coverageReporter` key was omitted, a type error was
emitted.

[PR]: #79
  • Loading branch information
aymericbeaumet committed May 25, 2014
1 parent 2eee554 commit a2cdf56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/preprocessor.js
Expand Up @@ -4,7 +4,7 @@ var istanbul = require('istanbul'),

var createCoveragePreprocessor = function(logger, basePath, reporters, coverageReporter) {
var log = logger.create('preprocessor.coverage');
var instrumenterOverrides = coverageReporter.instrumenter || {};
var instrumenterOverrides = (coverageReporter && coverageReporter.instrumenter) || {};
var instrumenters = {istanbul: istanbul, ibrik: ibrik};

// if coverage reporter is not used, do not preprocess the files
Expand Down

0 comments on commit a2cdf56

Please sign in to comment.