Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cramforce committed Oct 17, 2016
1 parent 24e63e2 commit 7a674bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/service/url-replacements-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,9 @@ export class UrlReplacements {
return;
}
const docInfo = documentInfoForDoc(this.ampdoc);
// ORIGINAL_HREF_PROPERTY has the value of the href "pre-replacement".
// We set this to the original value before doing any work and use it
// on subsequent replacements, so that each run gets a fresh value.
const href = dev().assertString(
element[ORIGINAL_HREF_PROPERTY] || element.getAttribute('href'));
const url = parseUrl(href);
Expand Down

0 comments on commit 7a674bf

Please sign in to comment.