Calling getData() to apply some internal state

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-11-04 13:13:47 -03:00
parent 215bc348f8
commit 8b39902910
1 changed files with 3 additions and 0 deletions

View File

@ -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);
};