Skip to content

Commit

Permalink
[Fix #193] Passing intl prop to subquestion + changed wrong import
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Apr 29, 2024
1 parent 8baa158 commit d2f1c8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/Question.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ export default class Question extends React.Component {
question: question,
onChange: this.handleSubQuestionChange,
index: i,
intl: this.props.intl,
});
}
children.push(element);
Expand Down
4 changes: 2 additions & 2 deletions src/model/ValidationProcessor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Constants from "../constants/Constants";
import ValidatorFactory from "./ValidatorFactory.js";
import { createValidator } from "./ValidatorFactory.js";
import Utils from "../util/Utils.js";

export default class ValidationProcessor {
Expand All @@ -12,7 +12,7 @@ export default class ValidationProcessor {
*/
static updateQuestionValidation = (questions, question, index, intl) => {
if (question[Constants.HAS_ANSWER]) {
const validator = ValidatorFactory.createValidator(question, intl);
const validator = createValidator(question, intl);
const update = validator();

if (update) {
Expand Down

0 comments on commit d2f1c8c

Please sign in to comment.