Skip to content

Commit

Permalink
fix typescript error. clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 committed Oct 18, 2019
1 parent 4a788f2 commit 695aaed
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const getDependentVar = (analysis: AnalysisConfig) => {
};

export const getPredictionFieldName = (analysis: AnalysisConfig) => {
// Default to dependent_variable
// If undefined will be defaulted to dependent_variable when config is created
let predictionFieldName;
if (isRegressionAnalysis(analysis) && analysis.regression.prediction_field_name !== undefined) {
predictionFieldName = analysis.regression.prediction_field_name;
Expand Down Expand Up @@ -214,9 +214,7 @@ export const loadEvalData = async ({
predictionFieldName ? predictionFieldName : defaultPredictionField
}`;

const query = { term: {} };
// @ts-ignore TODO: fix types here
query.term[`${resultsField}.is_training`] = { value: isTraining };
const query = { term: { [`${resultsField}.is_training`]: { value: isTraining } } };

const config = {
index,
Expand Down

0 comments on commit 695aaed

Please sign in to comment.