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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use Array.isArray instead of an instanceof check #1417

Merged

Conversation

var-const
Copy link
Contributor

@var-const var-const commented Feb 6, 2021

Our code already relies on isArray whereas the instanceof check may fail when the array was created in a different module (as detailed in the linked issue).

Fixes #1409

@var-const var-const requested review from a team as code owners February 6, 2021 01:36
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Feb 6, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 6, 2021
@codecov
Copy link

codecov bot commented Feb 6, 2021

Codecov Report

Merging #1417 (bb8c645) into master (39b13ce) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1417   +/-   ##
=======================================
  Coverage   98.50%   98.50%           
=======================================
  Files          32       32           
  Lines       19392    19392           
  Branches     1362     1362           
=======================================
  Hits        19102    19102           
  Misses        286      286           
  Partials        4        4           
Impacted Files Coverage Δ
dev/src/serializer.ts 99.09% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39b13ce...bb8c645. Read the comment docs.

@JustinBeckwith JustinBeckwith changed the title Use Array.isArray instead of an instanceof check fix: Use Array.isArray instead of an instanceof check Feb 6, 2021
@schmidt-sebastian schmidt-sebastian merged commit 4a8c3cf into googleapis:master Feb 8, 2021
gcf-merge-on-green bot pushed a commit that referenced this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array objects may not qualify for instanceof Array
3 participants