mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
prevent deprecation warnings
This commit is contained in:
@@ -217,7 +217,7 @@ function get_server_route_handler(routes: ServerRoute[]) {
|
||||
|
||||
// intercept data so that it can be exported
|
||||
res.write = function(chunk: any) {
|
||||
chunks.push(new Buffer(chunk));
|
||||
chunks.push(Buffer.from(chunk));
|
||||
write.apply(res, arguments);
|
||||
};
|
||||
|
||||
@@ -227,7 +227,7 @@ function get_server_route_handler(routes: ServerRoute[]) {
|
||||
};
|
||||
|
||||
res.end = function(chunk?: any) {
|
||||
if (chunk) chunks.push(new Buffer(chunk));
|
||||
if (chunk) chunks.push(Buffer.from(chunk));
|
||||
end.apply(res, arguments);
|
||||
|
||||
process.send({
|
||||
|
||||
Reference in New Issue
Block a user