mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 16:48:10 +00:00
data/TrialHandler: reorder assignments in importConditions()
This commit is contained in:
parent
2d20c9303b
commit
a603a58521
@ -482,11 +482,11 @@ export class TrialHandler extends PsychObject
|
|||||||
|
|
||||||
if (typeof value === 'string')
|
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
|
// Parse doubly escaped line feeds
|
||||||
value = value.replace(/(\\n)/g, '\n');
|
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;
|
trial[fields[l]] = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user