Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 34fe24f

Browse files
committed
refactor($browser): correctly export helper used in specs
The helper is used in `fakeWindow.location.hash`. ATM, not test is using the `hash` getter, so there were no errors.
1 parent 8f28de4 commit 34fe24f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ng/browser.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
2-
/* global stripHash: true */
2+
/* global getHash: true, stripHash: false */
3+
4+
function getHash(url) {
5+
var index = url.indexOf('#');
6+
return index === -1 ? '' : url.substr(index);
7+
}
38

49
/**
510
* ! This is a private undocumented service !
@@ -62,11 +67,6 @@ function Browser(window, document, $log, $sniffer, $$taskTrackerFactory) {
6267

6368
cacheState();
6469

65-
function getHash(url) {
66-
var index = url.indexOf('#');
67-
return index === -1 ? '' : url.substr(index);
68-
}
69-
7070
/**
7171
* @name $browser#url
7272
*

0 commit comments

Comments
 (0)