Skip to content

Commit 3cea7f8

Browse files
authored
Fix misleading example
Fix update_nested example as the documentation tells about the "dot notation": > If your document contains nested objects, you can use "dot notation" to reference nested fields within the document when you call update()
1 parent f979ed0 commit 3cea7f8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

firestore/main/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,7 @@ function updateNested(db) {
336336
// [END_EXCLUDE]
337337
var updateNested = db.collection('users').doc('Frank').update({
338338
age: 13,
339-
favorites: {
340-
color: 'Red'
341-
}
339+
'favorites.color': 'Red'
342340
});
343341
// [END update_nested]
344342

0 commit comments

Comments
 (0)