Skip to content

Commit 138c728

Browse files
committed
bug: index off by one
Very minor bug but forceTrailingSlash always adds a / if set to true because the index was off by one.
1 parent da700a9 commit 138c728

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
var _this = this;
451451
var start = new Date();
452452
config = deepMixIn(config, _this.defaults.httpConfig);
453-
if (_this.defaults.forceTrailingSlash && config.url[config.url.length] !== '/') {
453+
if (_this.defaults.forceTrailingSlash && config.url[config.url.length-1] !== '/') {
454454
config.url += '/';
455455
}
456456
config.method = config.method.toUpperCase();

0 commit comments

Comments
 (0)