Skip to content

Commit

Permalink
Changed loose regex match to strict string comparison of service clas…
Browse files Browse the repository at this point in the history
…sname (#100)
  • Loading branch information
evanlouie authored and sozercan committed Feb 20, 2018
1 parent 0192fc8 commit 917b9df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/containers/ClassView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ interface IRouteProps {

function mapStateToProps({ catalog }: IStoreState, { match: { params } }: IRouteProps) {
const svcClass =
catalog.classes.find(
potential => !!potential.spec.externalName.match(new RegExp(params.className, "i")),
) || undefined;
catalog.classes.find(potential => !!(potential.spec.externalName === params.className)) ||
undefined;
return {
classes: catalog.classes,
classname: params.className,
Expand Down

0 comments on commit 917b9df

Please sign in to comment.