Fixed Buffer deprecated warnings when using node >= v10
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user