Skip to content

Commit 2d535a6

Browse files
stribehoutrentm
authored andcommittedMar 4, 2017
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.
1 parent 027cf5a commit 2d535a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎lib/bunyan.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ Logger.prototype.fatal = mkLogEmitter(FATAL);
10871087
Logger.stdSerializers = {};
10881088

10891089
// Serialize an HTTP request.
1090-
Logger.stdSerializers.req = function req(req) {
1090+
Logger.stdSerializers.req = function (req) {
10911091
if (!req || !req.connection)
10921092
return req;
10931093
return {
@@ -1105,7 +1105,7 @@ Logger.stdSerializers.req = function req(req) {
11051105
};
11061106

11071107
// Serialize an HTTP response.
1108-
Logger.stdSerializers.res = function res(res) {
1108+
Logger.stdSerializers.res = function (res) {
11091109
if (!res || !res.statusCode)
11101110
return res;
11111111
return {
@@ -1138,7 +1138,7 @@ function getFullErrorStack(ex)
11381138

11391139
// Serialize an Error object
11401140
// (Core error properties are enumerable in node 0.4, not in 0.6).
1141-
var errSerializer = Logger.stdSerializers.err = function err(err) {
1141+
var errSerializer = Logger.stdSerializers.err = function (err) {
11421142
if (!err || !err.stack)
11431143
return err;
11441144
var obj = {

0 commit comments

Comments
 (0)
Please sign in to comment.