Skip to content

Commit

Permalink
fix(extensions): Fix incorrect default value for fieldTypes (#121)
Browse files Browse the repository at this point in the history
## Summary

Fixes a bug in `contentful extension create` and `contentful extension update` introduced in v0.19.0

## Learnings

Don't use default values for `type: array`
  • Loading branch information
suevalov authored and Khaledgarbaya committed Feb 20, 2019
1 parent a2fd25c commit b52f6c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cmds/extension_cmds/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const builder = (yargs) => {
.option('management-token', { type: 'string', describe: 'Contentful management API token' })
.option('space-id', { type: 'string', describe: 'Space id' })
.option('environment-id', { type: 'string', describe: 'Environment id', default: 'master' })
.option('field-types', { type: 'array', describe: 'Field types', default: undefined })
.option('field-types', { type: 'array', describe: 'Field types' })
.option('descriptor', { type: 'string', describe: 'Path to an extension descriptor file' })
.option('src', { type: 'string', describe: 'URL to extension bundle' })
.option('srcdoc', { type: 'string', describe: 'Path to extension bundle' })
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/extension_cmds/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const builder = (yargs) => {
.option('management-token', { type: 'string', describe: 'Contentful management API token' })
.option('space-id', { type: 'string', describe: 'Space id' })
.option('environment-id', { type: 'string', describe: 'Environment id', default: 'master' })
.option('field-types', { type: 'array', describe: 'Field types', default: undefined })
.option('field-types', { type: 'array', describe: 'Field types' })
.option('descriptor', { type: 'string', describe: 'Path to an extension descriptor file' })
.option('src', { type: 'string', describe: 'URL to extension bundle' })
.option('srcdoc', { type: 'string', describe: 'Path to extension bundle' })
Expand Down

0 comments on commit b52f6c3

Please sign in to comment.