Skip to content

Commit

Permalink
fix: fix spelling correction for string match (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
stew-ro authored Jun 9, 2020
1 parent dad98b9 commit 28e53ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/react/components/pages/predict/predictPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,12 @@ export default class PredictPage extends React.Component<IPredictPageProps, IPre
}
const endpointURL = this.props.project.apiUriBase as string;
const apiKey = this.props.project.apiKey as string;
const analyzeScript = response.data.replace(/<endpoint>|<subsription_key>|<model_id>/gi,
const analyzeScript = response.data.replace(/<endpoint>|<subscription_key>|<model_id>/gi,
(matched: string) => {
switch (matched) {
case "<endpoint>":
return endpointURL;
case "<subsription_key>":
case "<subscription_key>":
return apiKey;
case "<model_id>":
return modelID;
Expand Down

0 comments on commit 28e53ce

Please sign in to comment.