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

Under certain circumstances location.href is not defined in IE8. #3305

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ng/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ function Browser(window, document, $log, $sniffer) {
}
} else {
if (replace) location.replace(url);
else location.href = url;
else if (location.href) location.href = url;
else location = url;
}
return self;
// getter
} else {
// the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
return location.href.replace(/%27/g,"'");
return (location.href || location).replace(/%27/g,"'");
}
};

Expand Down