Skip to content

Commit

Permalink
substring strings, rather than array indices (#5050)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkettner authored Dec 9, 2020
1 parent 133b3fe commit a767ddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playground/src/experiments/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ class Experiments extends FlyIn {
throw Error('Invalid experiment', experiment);
}

id = id[0].substring(5, id.length - 1);
id = id[0].substring(5, id[0].length - 1);
let name = experiment.match(EXPERIMENTS_NAME_PATTERN);
if (name) {
name = name[0]
.replace(/'\s\+\s+'/, '')
.trim()
.substring(1, name.length - 1);
.substring(1, name[0].length - 1);
} else {
name = id;
}
Expand Down

0 comments on commit a767ddd

Please sign in to comment.