Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down