From 509e74b1bfe3ef3df3473add6af3706b82a1d83a Mon Sep 17 00:00:00 2001 From: Josh Drake Date: Mon, 1 Dec 2014 11:58:26 -0600 Subject: [PATCH] Fixed handling of 'forceTrailingSlash' option. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 764e403..572e26a 100644 --- a/src/index.js +++ b/src/index.js @@ -73,7 +73,7 @@ dsHttpAdapterPrototype.HTTP = function (config) { var _this = this; var start = new Date(); config = deepMixIn(config, _this.defaults.httpConfig); - if (_this.defaults.forceTrailingSlash && config.url[config.url.length] !== '/') { + if (_this.defaults.forceTrailingSlash && config.url[config.url.length - 1] !== '/') { config.url += '/'; }