Merge pull request #3887 from influxdata/fix/tempVars-titles

Fix template variables in title when no values
pull/3888/head
Iris Scholten 2018-07-11 16:21:23 -07:00 committed by GitHub
commit 12ef6ba092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ export default class LayoutCell extends Component<Props> {
(acc, template) => {
const {tempVar} = template
const templateValue = template.values.find(v => v.localSelected)
const value = _.get(templateValue, 'value', str)
const value = _.get(templateValue, 'value', tempVar)
const regex = new RegExp(tempVar, 'g')
return acc.replace(regex, value)
},