File tree 1 file changed +9
-6
lines changed
packages/ra-core/src/reducer/admin/references
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,18 @@ export const getPossibleReferences = (
56
56
if ( possibleValues . error ) {
57
57
return possibleValues ;
58
58
}
59
- possibleValues = Array . from ( possibleValues ) ;
59
+ const possibleValuesList = Array . from ( possibleValues ) ;
60
60
selectedIds . forEach (
61
61
id =>
62
- possibleValues . some ( value => value === id ) ||
63
- possibleValues . unshift ( id )
62
+ possibleValuesList . some ( value => value === id ) ||
63
+ possibleValuesList . unshift ( id )
64
+ ) ;
65
+ return (
66
+ possibleValuesList
67
+ // @ts -ignore
68
+ . map ( id => referenceState . data [ id ] )
69
+ . filter ( r => typeof r !== 'undefined' )
64
70
) ;
65
- return possibleValues
66
- . map ( id => referenceState . data [ id ] )
67
- . filter ( r => typeof r !== 'undefined' ) ;
68
71
} ;
69
72
70
73
export default possibleValuesreducer ;
You can’t perform that action at this time.
0 commit comments