Skip to content

Commit 6c77f71

Browse files
committed
Merge pull request #307 from dremonkey/patch-1
bug: index off by one
2 parents da700a9 + 138c728 commit 6c77f71

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)