Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-05-12 07:34:31 +0300
committerdiosmosis <benaka@piwik.pro>2015-05-13 08:23:42 +0300
commitf2b5cb3c3ea00f6ef1fc441033e12e07d8fe24fa (patch)
treeacbc6af9ee1e339e26e31f5e4332b61a9f92b163 /plugins/CoreHome/angularjs/history
parent3e3dba32f4e2c52c99068951e75d96020cc21d4b (diff)
Get history service to work on IE8 by removing use of Array.forEach method (which is not available).
Diffstat (limited to 'plugins/CoreHome/angularjs/history')
-rw-r--r--plugins/CoreHome/angularjs/history/history.service.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/CoreHome/angularjs/history/history.service.js b/plugins/CoreHome/angularjs/history/history.service.js
index 85f65fded7..555afba6b6 100644
--- a/plugins/CoreHome/angularjs/history/history.service.js
+++ b/plugins/CoreHome/angularjs/history/history.service.js
@@ -39,11 +39,13 @@
function load(hash) {
// make sure the hash is just the query parameter values, w/o a starting #, / or ? char. broadcast.pageload & $location.path should get neither
- ['#', '/', '?'].forEach(function (char) {
- if (hash.charAt(0) == char) {
+ var chars = ['#', '/', '?'];
+ for (var i = 0; i != chars.length; ++i) {
+ var charToRemove = chars[i];
+ if (hash.charAt(0) == charToRemove) {
hash = hash.substring(1);
}
- });
+ }
$location.path(hash);