GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: not check index exclusion path for `null` values by mrnagydavid · Pull Request #1330 · googleapis/nodejs-datastore

This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Conversation

@mrnagydavid

@mrnagydavid mrnagydavid commented Oct 4, 2024

Copy link
Copy Markdown
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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kirillgroshkov and adelkov reacted with thumbs up emoji kirillgroshkov, adelkov, and frodi-karlsson reacted with rocket emoji
All reactions
  • 👍 2 reactions
  • 🚀 3 reactions
@mrnagydavid
fix: not check sub-property existence for null values
cb2575b
@mrnagydavid
mrnagydavid requested review from a team 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
Merge branch 'main' into index-exclusion-problem-statement
29a2aa5
@danieljbruce
danieljbruce requested a review from a team November 1, 2024 14:10
@danieljbruce
Merge branch 'main' into index-exclusion-problem-statement
ab67271
@danieljbruce danieljbruce mentioned this pull request Nov 20, 2024
fix: Don't throw an error for null inputs to the save function #1361
Closed
danieljbruce
danieljbruce approved these changes Nov 20, 2024
View reviewed changes
@danieljbruce
danieljbruce merged commit 5c0ddbc into googleapis:main Nov 20, 2024
@release-please release-please Bot mentioned this pull request Nov 20, 2024
chore(main): release 10.0.0 #1362
Merged
@danieljbruce

danieljbruce commented Nov 20, 2024

Copy link
Copy Markdown
Contributor

For additional notes on this PR see this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

1 more reviewer
@danieljbruce danieljbruce danieljbruce approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mrnagydavid @danieljbruce
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.