Skip to content

Commit

Permalink
Merge pull request #450 from mobxjs/fieldOverrides-fix
Browse files Browse the repository at this point in the history
Field overrides fix
  • Loading branch information
beepsoft authored Sep 3, 2024
2 parents 7d473fc + 07eb474 commit 1d0e6e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.17.3

...

## 0.17.2

- Fix tests, upgrade minor versions of mobx, mobx-state-tree
Expand Down
9 changes: 6 additions & 3 deletions generator/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,19 @@ exports.mergeConfigs = function mergeConfigs(args, config) {
!!args["--useIdentifierNumber"] || config.useIdentifierNumber,
fieldOverrides: args["--fieldOverrides"]
? parseFieldOverrides(args["--fieldOverrides"])
: parseFieldOverrides(config.fieldOverrides),
: config.fieldOverrides
? parseFieldOverrides(config.fieldOverrides)
: [],
dynamicArgs: !!args["--dynamicArgs"] || config.dynamicArgs,
debug: !!args["--debug"] || config.debug,
disableLogColors: !!args["--disableLogColors"] || config.disableLogColors
}
}

const parseFieldOverrides = (fieldOverrides) => {
const _fieldOverrides =
Array.isArray(fieldOverrides) ? fieldOverrides : fieldOverrides.split(",");
const _fieldOverrides = Array.isArray(fieldOverrides)
? fieldOverrides
: fieldOverrides.split(",")

return _fieldOverrides
.map((s) => s.trim())
Expand Down

0 comments on commit 1d0e6e7

Please sign in to comment.