Commit 57ae961 Christoph Pader
committed
1 parent e6bcbe6 commit 57ae961 Copy full SHA for 57ae961
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import _ from 'lodash' ;
2
- import type { OnyxEntry } from 'react-native-onyx' ;
2
+ import type { OnyxEntry , OnyxInputValue } from 'react-native-onyx' ;
3
3
import Onyx from 'react-native-onyx' ;
4
4
import Log from '@libs/Log' ;
5
5
import ONYXKEYS from '@src/ONYXKEYS' ;
@@ -24,7 +24,7 @@ export default function (): Promise<void> {
24
24
return resolve ( ) ;
25
25
}
26
26
27
- const newReportActionsDrafts : Record < ReportActionsDraftsKey , OnyxEntry < ReportActionsDrafts > > = { } ;
27
+ const newReportActionsDrafts : Record < ReportActionsDraftsKey , OnyxInputValue < ReportActionsDrafts > > = { } ;
28
28
Object . entries ( allReportActionsDrafts ) . forEach ( ( [ onyxKey , reportActionDrafts ] ) => {
29
29
const newReportActionsDraftsForReport : Record < string , ReportActionsDraft > = { } ;
30
30
@@ -54,7 +54,7 @@ export default function (): Promise<void> {
54
54
if ( isEmptyObject ( newReportActionsDraftsForReport ) ) {
55
55
Log . info ( '[Migrate Onyx] NO REMAINING' ) ;
56
56
// Clear if there are no drafts remaining
57
- newReportActionsDrafts [ onyxKey as ReportActionsDraftsKey ] = undefined ;
57
+ newReportActionsDrafts [ onyxKey as ReportActionsDraftsKey ] = null ;
58
58
} else if ( hasUnmigratedDraft ) {
59
59
// Only migrate if there are unmigrated drafts, there's no need to overwrite this onyx key with the same data
60
60
newReportActionsDrafts [ onyxKey as ReportActionsDraftsKey ] = newReportActionsDraftsForReport ;
You can’t perform that action at this time.
0 commit comments