Skip to content

Commit

Permalink
fix(defaultValues): Added fallback for optional default values
Browse files Browse the repository at this point in the history
We are using [commitizen](https://github.com/commitizen/cz-cli) and after bumping it to version 4.0.3 that bumped the version of [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog) to version 3.0.1 we started getting the error message .

After some investigating we could track it to the default values introduced in PR [commitizen#69](commitizen#69).

This PR makes it so the default values are optional and safeguards so if no default values are present it does not crash.
  • Loading branch information
tomkaar committed Oct 3, 2019
1 parent 4b23bbc commit df840fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -4,7 +4,7 @@ var engine = require('./engine');
var conventionalCommitTypes = require('conventional-commit-types');
var configLoader = require('commitizen').configLoader;

var config = configLoader.load();
var config = configLoader.load() || {};
var options = {
types: conventionalCommitTypes.types,
defaultType: process.env.CZ_TYPE || config.defaultType,
Expand Down

0 comments on commit df840fe

Please sign in to comment.