Fixed Buffer deprecated warnings when using node >= v10

This commit is contained in:
Nicolas Dextraze
2019-11-01 12:53:24 -07:00
parent 78677ba53e
commit 67dab18d53
8 changed files with 43 additions and 29 deletions

View File

@@ -24,8 +24,8 @@ function EventData(eventId, type, isJson, data, metadata) {
this.eventId = eventId;
this.type = type;
this.isJson = isJson || false;
this.data = data || new Buffer(0);
this.metadata = metadata || new Buffer(0);
this.data = data || Buffer.alloc(0);
this.metadata = metadata || Buffer.alloc(0);
Object.freeze(this);
}