CSR-1610: prettier 'fixes'

This commit is contained in:
Adam Caouette 2024-01-11 11:10:12 -05:00
parent e35fe3fb1b
commit 2fbc4e3bd5
5 changed files with 15 additions and 12 deletions

View file

@ -124,7 +124,10 @@ export default {
});
// if no preanswered questions then make sure index starts with the correct value
this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData);
this.currentGlassIndex = this.calculateQuestionIndex(
this.currentGlassIndex,
this.questionsData
);
},
async forwardButtonAction() {
const questionAnswersArray = this.questionsData.map((glass) => {

View file

@ -123,7 +123,10 @@ export default {
});
// if no preanswered questions then make sure index starts with the correct value
this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData);
this.currentGlassIndex = this.calculateQuestionIndex(
this.currentGlassIndex,
this.questionsData
);
},
async forwardButtonAction() {
const questionAnswersArray = this.questionsData.map((glass) => {

View file

@ -121,7 +121,10 @@ export default {
});
// if no preanswered questions then make sure index starts with the correct value
this.currentGlassIndex = this.calculateQuestionIndex(this.currentGlassIndex, this.questionsData);
this.currentGlassIndex = this.calculateQuestionIndex(
this.currentGlassIndex,
this.questionsData
);
},
async forwardButtonAction() {
const questionAnswersArray = this.questionsData.map((glass) => {

View file

@ -149,9 +149,7 @@ export default {
calculateQuestionIndex(currentGlassIndex, questionsData) {
// if no preanswered questions then make sure index starts with the correct value
if (currentGlassIndex === 0) {
return questionsData?.findIndex(
(glass) => glass.questions?.length > 0
);
return questionsData?.findIndex((glass) => glass.questions?.length > 0);
}
return currentGlassIndex;
},

View file

@ -423,9 +423,7 @@ describe("vehicle-questions-mixin", () => {
{
glassName: "Front",
glassLocation: "Driver",
questions: [
"example question"
]
questions: ["example question"],
},
];
const glassIndex = 0;
@ -449,9 +447,7 @@ describe("vehicle-questions-mixin", () => {
{
glassName: "Front",
glassLocation: "Driver",
questions: [
"example question"
]
questions: ["example question"],
},
];
const glassIndex = 1;