Change internal storage to number instead of Date
Summary: per title, for reasons see next diff :) Reviewed By: passy Differential Revision: D29327501 fbshipit-source-id: 548d943e90769af478232d3031d916fb399a067a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d02c560150
commit
aff02b2ca1
@@ -18,14 +18,14 @@ export type Crash = {
|
||||
callstack?: string;
|
||||
reason: string;
|
||||
name: string;
|
||||
date: Date;
|
||||
date: number;
|
||||
};
|
||||
|
||||
export type CrashLog = {
|
||||
callstack: string;
|
||||
reason: string;
|
||||
name: string;
|
||||
date?: Date | null;
|
||||
date?: number;
|
||||
};
|
||||
|
||||
export function devicePlugin(client: DevicePluginClient) {
|
||||
@@ -39,7 +39,7 @@ export function devicePlugin(client: DevicePluginClient) {
|
||||
selectedCrash.set(crashId as string);
|
||||
});
|
||||
|
||||
function reportCrash(payload: CrashLog | Crash) {
|
||||
function reportCrash(payload: CrashLog) {
|
||||
notificationID++;
|
||||
|
||||
const crash = {
|
||||
@@ -47,7 +47,7 @@ export function devicePlugin(client: DevicePluginClient) {
|
||||
callstack: payload.callstack,
|
||||
name: payload.name,
|
||||
reason: payload.reason,
|
||||
date: payload.date || new Date(),
|
||||
date: payload.date ?? Date.now(),
|
||||
};
|
||||
|
||||
crashes.update((draft) => {
|
||||
|
||||
Reference in New Issue
Block a user