diff options
Diffstat (limited to 'src/ng/location.js')
| -rw-r--r-- | src/ng/location.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ng/location.js b/src/ng/location.js index 727a0c2b..cf50952d 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -550,8 +550,8 @@ function $LocationProvider(){ // traverse the DOM up to find first A tag while (lowercase(elm[0].nodeName) !== 'a') { - if (elm[0] === $rootElement[0]) return; - elm = elm.parent(); + // ignore rewriting if no A tag (reached root element, or no parent - removed from document) + if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return; } var absHref = elm.prop('href'), |
