Skip to content

Commit

Permalink
try replacing fields with . before generally to avoid issues with AOA…
Browse files Browse the repository at this point in the history
….AOA
  • Loading branch information
Williangalvani committed Jul 6, 2024
1 parent e67fa69 commit c888e85
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Plotly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,13 @@ export default {
if (isNaN(field)) {
break
}
expression = expression.replaceAll(fields[field], 'a[' + field + ']')
// first looks for fields in the expression
if (expression.includes(`${fields[field]}.`)) {
expression = expression.replaceAll(`${fields[field]}.`, 'a[' + field + '].')
continue
}
// fallback to replacing message name instead
expression = expression.replaceAll(`${fields[field]}`, 'a[' + field + ']')
}
let f
try {
Expand Down

0 comments on commit c888e85

Please sign in to comment.