question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to strip of undefined values

See original GitHub issue

Hi,

Google Datastore ignores undefined values. Migrating to Firestore I must now update all writes (or the prototype) to strip of undefined values.

Error: Invalid use of type "undefined" as a Firestore argument

I think this will be a common error for people migrating from Datastore to Firestore so maybe it could be a part of the library?

I would also like to add that implementing this library was an awesome experience 😄

Thank you!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
schmidt-sebastiancommented, Jun 30, 2020

Sorry - this is a really old issue. We actually added support for this mode based on an issue that was filed recently. You can now ignore undefined values by passing ignoreUndefinedProperties: true to Firestore’s constructor or its settings() method.

2reactions
ghostcommented, Jan 29, 2019

I am getting this error also, reopen it please

Read more comments on GitHub >

github_iconTop Results From Across the Web

Removing undefined values from Array - Stack Overflow
To use Array.prototype.filter here might be obvious. So to remove only undefined values we could call var data = [42, 21, undefined, 50,...
Read more >
Remove undefined values from an array in JavaScript
This post will discuss how to remove undefined values from an array in JavaScript. The solution should return a new array that excludes...
Read more >
How to Add / Remove Options of a Selection Box Dynamically
In this tutorial, you will learn how to dynamically add and remove options of a select box using plain JavaScript.
Read more >
How to hide null values from a Tableau filter - TAR Solutions
This article is a guide to hiding items, including Null values and non-null values, from a quick filter in Tableau by using calculated ......
Read more >
JavaScript array: Remove null, 0, blank, false, undefined and ...
Write a JavaScript function to remove. 'null', '0', '""', 'false', 'undefined' and 'NaN' values from an array.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found