Skip to content

Conversation

@mrnagydavid
Copy link
Contributor

This PR fixes issue #1327 🦕

Summary

Considering the following 4 types of index exclusions:

  1. excludeFromindexes: ['foo.*']
  2. excludeFromindexes: ['foo.bar']
  3. excludeFromindexes: ['foo[].*']
  4. excludeFromindexes: ['foo[].bar']

Supplying { entity: { foo: null } } throws for 2 and 3, but not for 1 and 4.

save({ excludeFromIndexes: ['foo.bar'], entity: { sho: 1, foo: null }) // throws TypeError: Cannot read properties of undefined (reading 'properties') save({ excludeFromIndexes: ['foo[].*'], entity: { sho: 1, foo: null }) // throws TypeError: Cannot read properties of undefined (reading 'values')

With the changes in this PR, the save calls will not throw in any of the 4 cases.

@mrnagydavid mrnagydavid requested review from a team as code owners October 4, 2024 09:39
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: datastore Issues related to the googleapis/nodejs-datastore API. labels Oct 4, 2024
@danieljbruce danieljbruce requested a review from a team as a code owner November 1, 2024 14:10
@danieljbruce danieljbruce merged commit 5c0ddbc into googleapis:main Nov 20, 2024
23 checks passed
@danieljbruce
Copy link
Contributor

For additional notes on this PR see this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastore Issues related to the googleapis/nodejs-datastore API. size: s Pull request size is small.

2 participants