-
Notifications
You must be signed in to change notification settings - Fork 928
Don't normalize Proto data during deepClone #5147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0c273f2
4c0cba4
f809262
e143e9a
90f8aa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"firebase": patch | ||
"@firebase/firestore": patch | ||
--- | ||
|
||
Fixed an issue that prevented Timestamps from being used via `update()` when connected to the Emulator |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,8 +559,11 @@ export function isMapValue( | |
export function deepClone(source: Value): Value { | ||
if (source.geoPointValue) { | ||
return { geoPointValue: { ...source.geoPointValue } }; | ||
} else if (source.timestampValue) { | ||
return { timestampValue: { ...normalizeTimestamp(source.timestampValue) } }; | ||
} else if ( | ||
source.timestampValue && | ||
typeof source.timestampValue === 'object' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't follow why we need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The timestampValue can be a string, in which case |
||
) { | ||
return { timestampValue: { ...source.timestampValue } }; | ||
} else if (source.mapValue) { | ||
const target: Value = { mapValue: { fields: {} } }; | ||
forEach( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to move this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's now causing a Lint failure (some tools have been updated)