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

fix(location): check for existence before using #4443

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
2 changes: 1 addition & 1 deletion src/ng/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function parseAppUrl(relativeUrl, locationObj) {
* @returns {string} returns text from whole after begin or undefined if it does not begin with expected string.
*/
function beginsWith(begin, whole) {
if (whole.indexOf(begin) == 0) {
if (whole && whole.indexOf(begin) == 0) {
return whole.substr(begin.length);
}
}
Expand Down