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:
George Kalpakas
2018-07-19 19:20:33 +03:00
parent fdfba097da
commit 8562a62197
+6 -6
View File
@@ -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
*