Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use Array.isArray to check if array #521

Merged
merged 3 commits into from Jan 6, 2019
Merged

Always use Array.isArray to check if array #521

merged 3 commits into from Jan 6, 2019

Conversation

dobrynin
Copy link
Contributor

Summary:

Change usage of array instanceOf Array and util.isArray(array) to Array.isArray(array).
My team found this to be an issue when trying to use the Model.batchPut.

Other information:

Type (select 1):

  • Bug fix
  • Feature implementation
  • Documentation improvement
  • Testing improvement
  • Test added to report bug (GitHub issue #--- @---)
  • Something not listed here

Is this a breaking change? (select 1):

  • 馃毃 YES 馃毃
  • No
  • I'm not sure

Is this ready to be merged into Dynamoose? (select 1):

  • Yes
  • No

Are all the tests currently passing on this PR? (select 1):

  • Yes
  • No

Other:

  • I have searched through the GitHub pull requests to ensure this PR has not already been submitted
  • I have updated the Dynamoose documentation (if required) given the changes I made
  • I have added/updated the Dynamoose test cases (if required) given the changes I made
  • I have run npm test from the root of the project directory to ensure all tests continue to pass
  • I agree that all changes made in this pull request may be distributed and are made available in accordance with the Dynamoose license
  • All of my commits and commit messages are detailed, explain what changes were made, and are easy to follow and understand
  • I have confirmed that all my code changes are indented properly using 2 spaces
  • I have filled out all fields above

@coveralls
Copy link

Pull Request Test Coverage Report for Build 817

  • 17 of 17 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.507%

Totals Coverage Status
Change from base Build 810: 0.0%
Covered Lines: 2183
Relevant Lines: 2477

馃挍 - Coveralls

2 similar comments
@coveralls
Copy link

Pull Request Test Coverage Report for Build 817

  • 17 of 17 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.507%

Totals Coverage Status
Change from base Build 810: 0.0%
Covered Lines: 2183
Relevant Lines: 2477

馃挍 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 817

  • 17 of 17 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.507%

Totals Coverage Status
Change from base Build 810: 0.0%
Covered Lines: 2183
Relevant Lines: 2477

馃挍 - Coveralls

@coveralls
Copy link

coveralls commented Dec 31, 2018

Pull Request Test Coverage Report for Build 833

  • 17 of 17 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.447%

Totals Coverage Status
Change from base Build 832: 0.0%
Covered Lines: 2192
Relevant Lines: 2488

馃挍 - Coveralls

Copy link
Member

@fishcharlie fishcharlie left a comment

Choose a reason for hiding this comment

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

@dobrynin

My team found this to be an issue when trying to use the Model.batchPut.

Mind adding a test case for this that fails without this PR and is successful with it? That would also be good because it would ensure your project doesn't break in the future.

@dobrynin
Copy link
Contributor Author

dobrynin commented Jan 2, 2019

Just pushed a test, please take a look @fishcharlie.

@fishcharlie fishcharlie mentioned this pull request Jan 3, 2019
@fishcharlie
Copy link
Member

@dobrynin Looks like there is a merge conflict. Wanna try to solve that?

@fishcharlie
Copy link
Member

@dobrynin And just to confirm. That test you added, fails without your changes, correct?

Copy link
Member

@fishcharlie fishcharlie left a comment

Choose a reason for hiding this comment

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

LGTM

@dobrynin
Copy link
Contributor Author

dobrynin commented Jan 3, 2019

All set. The test fails without these changes. The test is for the specific case that gave us trouble (batchPut)

@fishcharlie fishcharlie merged commit 121e188 into dynamoose:master Jan 6, 2019
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.

None yet

3 participants