mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
chore($location): drop bugus error
we can never get to this state, so dropping the error
This commit is contained in:
parent
d4d34aba6e
commit
544d2616b4
3 changed files with 0 additions and 14 deletions
|
|
@ -1,4 +0,0 @@
|
|||
@ngdoc error
|
||||
@name $location:istart
|
||||
@fullName Invalid URL
|
||||
@description
|
||||
|
|
@ -161,9 +161,6 @@ function LocationHashbangUrl(appBase, hashPrefix) {
|
|||
*/
|
||||
this.$$parse = function(url) {
|
||||
var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
|
||||
if (!isString(withoutBaseUrl)) {
|
||||
throw $locationMinErr('istart', 'Invalid url "{0}", does not start with "{1}".', url, appBase);
|
||||
}
|
||||
var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'
|
||||
? beginsWith(hashPrefix, withoutBaseUrl)
|
||||
: (this.$$html5)
|
||||
|
|
|
|||
|
|
@ -338,13 +338,6 @@ describe('$location', function() {
|
|||
});
|
||||
|
||||
|
||||
it('should throw error when invalid server url given', function() {
|
||||
expect(function() {
|
||||
url.$$parse('http://server.org/path#/path');
|
||||
}).toThrow('[$location:istart] Invalid url "http://server.org/path#/path", does not start with "http://www.server.org:1234/base".');
|
||||
});
|
||||
|
||||
|
||||
it('should throw error when invalid hashbang prefix given', function() {
|
||||
expect(function() {
|
||||
url.$$parse('http://www.server.org:1234/base#/path');
|
||||
|
|
|
|||
Loading…
Reference in a new issue