Fix Date Label In Crashes Plugin
Summary: The date type for crash reports was updated in D29327501 (aff02b2ca1) from `Date` to `number`. Unset values were previously `null` but became `NaN` in this change. `NaN` is nonnull so the backup value of `Date.now()` was not getting triggered properly and leading to "Invalid Date" to show up in the UI.
Reviewed By: passy
Differential Revision: D31702757
fbshipit-source-id: da93b1f79eb633b2f49dcffbe680d56d47a23ea0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b4647eaa13
commit
9d34c90b9a
@@ -47,7 +47,7 @@ export function devicePlugin(client: DevicePluginClient) {
|
|||||||
callstack: payload.callstack,
|
callstack: payload.callstack,
|
||||||
name: payload.name,
|
name: payload.name,
|
||||||
reason: payload.reason,
|
reason: payload.reason,
|
||||||
date: payload.date ?? Date.now(),
|
date: payload.date || Date.now(),
|
||||||
};
|
};
|
||||||
|
|
||||||
crashes.update((draft) => {
|
crashes.update((draft) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user