Skip to content

Add an error message when a value for array has not been defined#9649

Merged
sushantdhiman merged 5 commits intosequelize:masterfrom
u9r52sld:handle_error_for_array
Jul 14, 2018
Merged

Add an error message when a value for array has not been defined#9649
sushantdhiman merged 5 commits intosequelize:masterfrom
u9r52sld:handle_error_for_array

Conversation

@u9r52sld
Copy link
Contributor

@u9r52sld u9r52sld commented Jul 12, 2018

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Adding an error message when a value for ARRAY have not been defined.

See issue: #7932

@codecov
Copy link

codecov bot commented Jul 12, 2018

Codecov Report

Merging #9649 into master will increase coverage by <.01%.
The diff coverage is 100%.

lib/sequelize.js Outdated
type.type = dialectTypes[type.type.key].extend(type.type);
if (type instanceof DataTypes.ARRAY) {
if (!type.type) {
throw new Error('A value for ARRAY have not been defined.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has. "A value for ARRAY has not been defined." :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing it out.
I modified it.

@u9r52sld u9r52sld changed the title Add an error message when a value for array have not been defined Add an error message when a value for array has not been defined Jul 13, 2018
@sushantdhiman sushantdhiman merged commit c90c8d5 into sequelize:master Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants