mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
050b629f29
commit
1cf7368761
1 changed files with 12 additions and 1 deletions
|
@ -37,7 +37,18 @@ export class LoggingAction extends BaseAction {
|
|||
|
||||
get upstreamJson() {
|
||||
const result = super.upstreamJson;
|
||||
const text = !!this.text.trim() ? this.text : undefined;
|
||||
let text;
|
||||
|
||||
if (typeof this.text === 'string') {
|
||||
// If this.text is a non-empty string, we can send it to the API.
|
||||
if (!!this.text.trim()) {
|
||||
text = this.text;
|
||||
}
|
||||
} else {
|
||||
// If the user incorrectly defined this.text, e.g. as an object in a JSON watch, let the API
|
||||
// deal with it.
|
||||
text = this.text;
|
||||
}
|
||||
|
||||
Object.assign(result, {
|
||||
text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue