Commit 85f4af7e 85f4af7ea87641c813862072911639ca7579215a by Justin Slattery

ref #295 - Adding fallback to casperScript name if the final value of the script string is empty.

1 parent d4667cef
......@@ -55,6 +55,12 @@ function generateClassName(classname) {
if (~script.indexOf('.')) {
script = script.substring(0, script.lastIndexOf('.'));
}
// If we have trimmed our string down to nothing, default to script name
if (!script && phantom.casperScript) {
script = phantom.casperScript;
}
return script || "unknown";
}
......