Skip to content

Commit

Permalink
Fixed sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav Awasthi authored and Pranav Awasthi committed Aug 20, 2024
1 parent 9e45a91 commit 162c254
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,14 @@ jQuery(function () {
} else {
value = $i_this.val();
}
let sendValue = typeof value === 'string' ? value.trim() : value.length ? value[value.length - 1] : '';
let sendValue;
if (typeof value === 'string') {
sendValue = value.trim();
} else if (value.length) {
sendValue = value[value.length - 1];
} else {
sendValue = '';
}
clearTimeout(qsm_inline_result_timer);
qsm_inline_result_timer = setTimeout(() => {
if (qmn_quiz_data[quizID].enable_quick_result_mc == 1) {
Expand Down

0 comments on commit 162c254

Please sign in to comment.