@@ -150,7 +150,16 @@ const fieldsTransducer = (fields) =>
150
150
const orderTransducer = ( order ) => {
151
151
const isFlat = typeof order [ 0 ] === 'string' ;
152
152
const orders = isFlat ? [ order ] : order ;
153
- return partialRight . apply ( null , [ orderBy , ...zip . apply ( null , orders ) ] ) ;
153
+ const [ fields , direction ] = zip (
154
+ ...orders . map ( ( [ field , dir ] ) => [
155
+ ( data ) =>
156
+ typeof data [ field ] === 'string'
157
+ ? data [ field ] . toLowerCase ( )
158
+ : data [ field ] ,
159
+ dir || 'asc' ,
160
+ ] ) ,
161
+ ) ;
162
+ return partialRight ( map , ( docs ) => orderBy ( docs , fields , direction ) ) ;
154
163
} ;
155
164
156
165
/**
@@ -542,7 +551,7 @@ function cleanOverride(draft, { path, id, data }) {
542
551
543
552
const initialize = ( state , { action, key, path } ) =>
544
553
produce ( state , ( draft ) => {
545
- const done = mark ( `cache.LISTENER_RESPONSE ` , key ) ;
554
+ const done = mark ( `cache.${ action . type . replace ( / ( @ @ . + \/ ) / , '' ) } ` , key ) ;
546
555
if ( ! draft . database ) {
547
556
set ( draft , [ 'database' ] , { } ) ;
548
557
set ( draft , [ 'databaseOverrides' ] , { } ) ;
0 commit comments