FieldPath only escapes the first \
and '`', resulting in INVALID_ARGUMENT response
#2019
Labels
api: firestore
Issues related to the googleapis/nodejs-firestore API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
@google-cloud/firestore
version: v7.3.1Steps to reproduce
Try to use a FieldPath with multiple backslashes or backtick, for example:
Run the query, then you get:
3 INVALID_ARGUMENT: Invalid property path ...
This is because of the use of
replace
in the following line:nodejs-firestore/dev/src/path.ts
Line 624 in e598b9d
The
replace()
method only replaces the first occurence of the given pattern (see MDN for more info).The text was updated successfully, but these errors were encountered: