From 8b399029109a3eb33ded5b3a3583c181762dbd53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Mon, 4 Nov 2019 13:13:47 -0300 Subject: [PATCH] Calling getData() to apply some internal state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/cloudevent.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cloudevent.js b/lib/cloudevent.js index 4f05de3..3efd1c5 100644 --- a/lib/cloudevent.js +++ b/lib/cloudevent.js @@ -26,6 +26,9 @@ Cloudevent.prototype.format = function(){ // Check the constraints this.spec.check(); + // To run asData() + this.getData(); + // Then, format return this.formatter.format(this.spec.payload); };