refactor($browser): correctly export helper used in specs
The helper is used in `fakeWindow.location.hash`. ATM, no test is using the `hash` getter, so there were no errors.
This commit is contained in:
+6
-6
@@ -1,5 +1,10 @@
|
||||
'use strict';
|
||||
/* global stripHash: true */
|
||||
/* global getHash: true, stripHash: false */
|
||||
|
||||
function getHash(url) {
|
||||
var index = url.indexOf('#');
|
||||
return index === -1 ? '' : url.substr(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* ! This is a private undocumented service !
|
||||
@@ -62,11 +67,6 @@ function Browser(window, document, $log, $sniffer, $$taskTrackerFactory) {
|
||||
|
||||
cacheState();
|
||||
|
||||
function getHash(url) {
|
||||
var index = url.indexOf('#');
|
||||
return index === -1 ? '' : url.substr(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name $browser#url
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user