Closed joaoluis-pdm closed 3 years ago
...
const { GHI, TRIAL_PREFS, CONDITION, TRIAL } = require('../formDefs');
...
class MatchRequest extends Validatable{
...
/**
*
* @param {object} ghi an LForm for general health information.
*/
constructor(ghi) {
super();
this.id = '_' + Math.random().toString(36);
// deep clone ghi
if (ghi)
this.ghiForm = JSON.parse(JSON.stringify(ghi));
else
this.ghiForm = JSON.parse(JSON.stringify(GHI)); <------- line 2008
}
Hypotesis: Somehow, the GHI constant was used for an LForm without deep clone before, and became corrupted.
How to reproduce: 1 - register a new user 2 - click General Health information, and do not UPDATE (save) anything. 3 - click "FIND A TRIAL", and the error of this issue will occur.
Enviado: 12 de agosto de 2021 22:09 ...
Thank you so much! I tested and it is working fine.
One issue I encountered, details are below.
Hope you see the screenshot this time. If not the error says “TypeError : Json strngify cannot serialize cyclic structure”