Skip to content

Commit

Permalink
feat(rpc/handlerMap): return default handler if passed action name is…
Browse files Browse the repository at this point in the history
… falsy
  • Loading branch information
CheerlessCloud committed Oct 2, 2018
1 parent 0457959 commit 4acbd79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rpc/HandlerMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class HandlerMap {
this._map.set(action, handler);
}

get(action: string): ?Class<IHandler> {
return this._map.get(action);
get(action: ?string): ?Class<IHandler> {
return this._map.get(action || 'default');
}
}

0 comments on commit 4acbd79

Please sign in to comment.