Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Closed
Prev Previous commit
Next Next commit
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.
  • Loading branch information
gkalpak committed Jul 26, 2018
commit 8053bc48537b77a6b6ea7375a9d34c87a25746bd
12 changes: 6 additions & 6 deletions src/ng/browser.js
Original file line number Diff line number Diff line change
@@ -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 !
Expand Down Expand Up @@ -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
*
Expand Down