Skip to content

Commit

Permalink
Added check if overriden value is primitive value like number or bool…
Browse files Browse the repository at this point in the history
…ean (#508)

* Added check if overriden value is primitive value like number or boolean

* Fixed formatting
  • Loading branch information
rosieks committed Dec 4, 2020
1 parent 65a0621 commit a4ee598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/utils/rewireJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = (config) => {
.forEach(key => {
//We don't overwrite the default config, but add to each property if not a string
if(config[key]) {
if(typeof overrides[key] === 'string') {
if(typeof overrides[key] === 'string' || typeof overrides[key] === 'number' || typeof overrides[key] === 'boolean') {
config[key] = overrides[key];
} else if(Array.isArray(overrides[key])) {
config[key] = overrides[key].concat(config[key]);
Expand Down

0 comments on commit a4ee598

Please sign in to comment.