Anonymise some functions to work around Safari bug
Some Safari versions will error with a syntax error if a function has the same name as one of its parameter. Found the bug in safari included with iOS 9.3.5. Fixed for me with this patch.
This commit is contained in:
parent
027cf5aab1
commit
2d535a6395
1 changed files with 3 additions and 3 deletions
|
@ -1087,7 +1087,7 @@ Logger.prototype.fatal = mkLogEmitter(FATAL);
|
|||
Logger.stdSerializers = {};
|
||||
|
||||
// Serialize an HTTP request.
|
||||
Logger.stdSerializers.req = function req(req) {
|
||||
Logger.stdSerializers.req = function (req) {
|
||||
if (!req || !req.connection)
|
||||
return req;
|
||||
return {
|
||||
|
@ -1105,7 +1105,7 @@ Logger.stdSerializers.req = function req(req) {
|
|||
};
|
||||
|
||||
// Serialize an HTTP response.
|
||||
Logger.stdSerializers.res = function res(res) {
|
||||
Logger.stdSerializers.res = function (res) {
|
||||
if (!res || !res.statusCode)
|
||||
return res;
|
||||
return {
|
||||
|
@ -1138,7 +1138,7 @@ function getFullErrorStack(ex)
|
|||
|
||||
// Serialize an Error object
|
||||
// (Core error properties are enumerable in node 0.4, not in 0.6).
|
||||
var errSerializer = Logger.stdSerializers.err = function err(err) {
|
||||
var errSerializer = Logger.stdSerializers.err = function (err) {
|
||||
if (!err || !err.stack)
|
||||
return err;
|
||||
var obj = {
|
||||
|
|
Loading…
Reference in a new issue