File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export class PushController {
61
61
} ) . catch ( ( err ) => {
62
62
return pushStatus . fail ( err ) . then ( ( ) => {
63
63
throw err ;
64
- } )
64
+ } ) ;
65
65
} ) ;
66
66
}
67
67
Original file line number Diff line number Diff line change @@ -12,19 +12,15 @@ import { PushQueue } from './PushQueue';
12
12
13
13
const UNSUPPORTED_BADGE_KEY = "unsupported" ;
14
14
15
- function groupBy ( key , objects ) {
16
- return objects . reduce ( ( map , object ) => {
17
- const value = object [ key ] + '' ;
18
- map [ value ] = map [ value ] || [ ] ;
19
- map [ value ] . push ( object ) ;
15
+ function groupByBadge ( installations ) {
16
+ return installations . reduce ( ( map , installation ) => {
17
+ const badge = installation . badge + '' ;
18
+ map [ badge ] = map [ badge ] || [ ] ;
19
+ map [ badge ] . push ( installation ) ;
20
20
return map ;
21
21
} , { } ) ;
22
22
}
23
23
24
- function groupByBadge ( installations ) {
25
- return groupBy ( 'badge' , installations ) ;
26
- }
27
-
28
24
export class PushWorker {
29
25
subscriber : ?any ;
30
26
adapter : any ;
Original file line number Diff line number Diff line change @@ -28,9 +28,7 @@ export class PushRouter extends PromiseRouter {
28
28
result : true
29
29
}
30
30
} ) ;
31
- } ) . catch ( ( err ) => {
32
- req . config . loggerController . error ( err ) ;
33
- } ) ;
31
+ } ) . catch ( req . config . loggerController . error ) ;
34
32
return promise ;
35
33
}
36
34
You can’t perform that action at this time.
0 commit comments