1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-12 08:38:10 +00:00

data/TrialHandler: reorder assignments in importConditions()

This commit is contained in:
Sotiri Bakagiannis 2021-02-18 16:46:29 +00:00
parent 2d20c9303b
commit a603a58521

View File

@ -482,11 +482,11 @@ export class TrialHandler extends PsychObject
if (typeof value === 'string')
{
// if value is a numerical string, convert it to a number:
value = Number.isNaN(value) ? value : Number.parseFloat(value);
// Parse doubly escaped line feeds
value = value.replace(/(\\n)/g, '\n');
// if value is a numerical string, convert it to a number:
value = isNaN(value) ? value : Number.parseFloat(value);
}
trial[fields[l]] = value;