tango-app-api-trax 3.4.1-alpha-5 → 3.4.1-alpha-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2794,7 +2794,7 @@ export async function questionList( req, res ) {
|
|
|
2794
2794
|
ele.answers.forEach( ( ans ) => {
|
|
2795
2795
|
if ( ans.linkedQuestion ) {
|
|
2796
2796
|
ans.nestedQuestion.forEach( ( nested, idx ) => {
|
|
2797
|
-
let findRandom = nesedQuestion.find( ( qn ) => qn.qno == nested && !nestedLinkqn.includes( qn.uniqueNo ) && !qn.updated );
|
|
2797
|
+
let findRandom = nesedQuestion.find( ( qn ) => ( !question?.uniqueqno ? qn.qno == nested : qn.uniqueNo == nested ) && !nestedLinkqn.includes( qn.uniqueNo ) && !qn.updated );
|
|
2798
2798
|
if ( findRandom ) {
|
|
2799
2799
|
if ( ans.linkedQuestion == findRandom.qno ) {
|
|
2800
2800
|
ans.linkedQuestion = findRandom.uniqueNo;
|