Fix 'undefined' arg in JS execution tree
This commit is contained in:
+2
-2
@@ -7,10 +7,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"phantomas": "1.6.0",
|
||||
"express": "~4.10.0",
|
||||
"express": "~4.10.1",
|
||||
"async": "~0.9.0",
|
||||
"socket.io": "~1.2.0",
|
||||
"body-parser": "~1.9.1",
|
||||
"body-parser": "~1.9.2",
|
||||
"compression": "1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -228,6 +228,10 @@ exports.module = function(phantomas) {
|
||||
|
||||
arg = phantomas.getDOMPath(arg) || 'unknown';
|
||||
|
||||
} else if (typeof arg === 'function') {
|
||||
|
||||
arg = '(function)';
|
||||
|
||||
} else {
|
||||
|
||||
try {
|
||||
@@ -239,10 +243,14 @@ exports.module = function(phantomas) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof arg == 'string' || arg instanceof String) && arg.length > 200) {
|
||||
if ((typeof arg === 'string' || arg instanceof String) && arg.length > 200) {
|
||||
arg = arg.substring(0, 200) + '...';
|
||||
}
|
||||
|
||||
if (typeof arg === 'function') {
|
||||
arg = '(function)';
|
||||
}
|
||||
|
||||
if (arg === true) {
|
||||
arg = 'true';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user