Skip to content

Commit 58280fd

Browse files
author
Shakeel Mohamed
committed
Rename pathIsSlash to more accurate pathIsNotSlash
1 parent 7bce20a commit 58280fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

splunklogger.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ SplunkLogger.prototype._initializeConfig = function(config) {
141141
var parsed = url.parse(config.url);
142142

143143
// Ignore the path if it's just "/"
144-
var pathIsSlash = parsed.path && parsed.path !== "/";
144+
var pathIsNotSlash = parsed.path && parsed.path !== "/";
145145

146146
if (parsed.protocol) {
147147
config.protocol = parsed.protocol.replace(":", "");
@@ -151,11 +151,11 @@ SplunkLogger.prototype._initializeConfig = function(config) {
151151
}
152152
if (parsed.hostname && parsed.path) {
153153
config.host = parsed.hostname;
154-
if (pathIsSlash) {
154+
if (pathIsNotSlash) {
155155
config.path = parsed.path;
156156
}
157157
}
158-
else if (pathIsSlash) {
158+
else if (pathIsNotSlash) {
159159
// If hostname isn't set, but path is assume path is the host
160160
config.host = parsed.path;
161161
}

0 commit comments

Comments
 (0)