Skip to content

Commit 016bd42

Browse files
committed
chore: simplify, use ternary
1 parent 0dbde70 commit 016bd42

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/events/http/HttpServer.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -685,11 +685,8 @@ export default class HttpServer {
685685
headerValue = valueArray[3]
686686
? jsonPath(result, valueArray.slice(3).join('.'))
687687
: result
688-
if (headerValue === undefined || headerValue === null) {
689-
headerValue = ''
690-
} else {
691-
headerValue = headerValue.toString()
692-
}
688+
689+
headerValue = headerValue == null ? '' : String(headerValue)
693690
} else {
694691
log.notice()
695692

0 commit comments

Comments
 (0)