From b1c32064c0c1386f01df728850102cf0106db3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Sun, 20 Jan 2019 21:08:46 -0200 Subject: [PATCH] Fix for-in issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/bindings/http/binary_0_2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bindings/http/binary_0_2.js b/lib/bindings/http/binary_0_2.js index 58e39cb..c398a0b 100644 --- a/lib/bindings/http/binary_0_2.js +++ b/lib/bindings/http/binary_0_2.js @@ -36,7 +36,9 @@ HTTPBinary.prototype.emit = function(cloudevent){ // Have extensions? var exts = cloudevent.getExtensions(); for(var ext in exts){ - _headers["ce-" + ext] = exts[ext]; + if({}.hasOwnProperty.call(exts, ext)){ + _headers["ce-" + ext] = exts[ext]; + } } // Return the Promise