bart-tile/dist/js/reducers/update.js

18 lines
337 B
JavaScript
Raw Permalink Normal View History

2020-05-10 04:24:46 -07:00
import _ from 'lodash';
export class UpdateReducer {
reduce(json, state) {
let data = _.get(json, 'update', false);
if (data) {
this.reduceInbox(_.get(data, 'inbox', false), state);
}
}
reduceInbox(inbox, state) {
if (inbox) {
state.inbox = inbox;
}
}
}