Skip to content

Commit

Permalink
refactor: use prototype.includes
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 30, 2022
1 parent df77e14 commit 50679e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lambda/handler-runner/go-runner/GoRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ export default class GoRunner {
let payload

for (const item of value.split(EOL)) {
if (item.indexOf(PAYLOAD_IDENTIFIER) === -1) {
logs.push(item)
} else {
if (item.includes(PAYLOAD_IDENTIFIER)) {
try {
const {
offline_payload: { success, error },
offline_payload: { error, success },
} = parse(item)

if (success) {
Expand All @@ -67,6 +65,8 @@ export default class GoRunner {
} catch {
// @ignore
}
} else {
logs.push(item)
}
}

Expand Down

0 comments on commit 50679e1

Please sign in to comment.