Skip to content

Commit 59322cf

Browse files
committed
nits
1 parent e1b592a commit 59322cf

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

src/Controllers/PushController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class PushController {
6161
}).catch((err) => {
6262
return pushStatus.fail(err).then(() => {
6363
throw err;
64-
})
64+
});
6565
});
6666
}
6767

src/Push/PushWorker.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@ import { PushQueue } from './PushQueue';
1212

1313
const UNSUPPORTED_BADGE_KEY = "unsupported";
1414

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);
2020
return map;
2121
}, {});
2222
}
2323

24-
function groupByBadge(installations) {
25-
return groupBy('badge', installations);
26-
}
27-
2824
export class PushWorker {
2925
subscriber: ?any;
3026
adapter: any;

src/Routers/PushRouter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ export class PushRouter extends PromiseRouter {
2828
result: true
2929
}
3030
});
31-
}).catch((err) => {
32-
req.config.loggerController.error(err);
33-
});
31+
}).catch(req.config.loggerController.error);
3432
return promise;
3533
}
3634

0 commit comments

Comments
 (0)