aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngResource/resource.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngResource/resource.js')
-rw-r--r--src/ngResource/resource.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js
index dedbf860..8874bbec 100644
--- a/src/ngResource/resource.js
+++ b/src/ngResource/resource.js
@@ -401,7 +401,7 @@ angular.module('ngResource', ['ng']).
});
// strip trailing slashes and set the url
- url = url.replace(/\/+$/, '');
+ url = url.replace(/\/+$/, '') || '/';
// then replace collapse `/.` if found in the last URL path segment before the query
// E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
url = url.replace(/\/\.(?=\w+($|\?))/, '.');