mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-20 06:15:15 +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
|
// intercept data so that it can be exported
|
||||||
res.write = function(chunk: any) {
|
res.write = function(chunk: any) {
|
||||||
chunks.push(new Buffer(chunk));
|
chunks.push(Buffer.from(chunk));
|
||||||
write.apply(res, arguments);
|
write.apply(res, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ function get_server_route_handler(routes: ServerRoute[]) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
res.end = function(chunk?: any) {
|
res.end = function(chunk?: any) {
|
||||||
if (chunk) chunks.push(new Buffer(chunk));
|
if (chunk) chunks.push(Buffer.from(chunk));
|
||||||
end.apply(res, arguments);
|
end.apply(res, arguments);
|
||||||
|
|
||||||
process.send({
|
process.send({
|
||||||
|
|||||||
Reference in New Issue
Block a user