Don't insert newlines with default Flux script
Co-authored-by: Chris Henn <chris.henn@influxdata.com> Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>pull/10616/head
parent
9d2181fc1a
commit
bee3a4aa3e
|
@ -268,8 +268,15 @@ export class FluxPage extends PureComponent<Props, State> {
|
|||
|
||||
private handleAppendFrom = (): void => {
|
||||
const {script} = this.props
|
||||
const newScript = `${script.trim()}\n\n${builder.NEW_FROM}\n\n`
|
||||
let newScript = script.trim()
|
||||
const from = builder.NEW_FROM
|
||||
|
||||
if (!newScript) {
|
||||
this.getASTResponse(from)
|
||||
return
|
||||
}
|
||||
|
||||
newScript = `${script.trim()}\n\n${from}\n\n`
|
||||
this.getASTResponse(newScript)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue