Skip to content

Commit

Permalink
Merge pull request #131 from github/title-loop
Browse files Browse the repository at this point in the history
Prevent infinite loop when title attribute is changed
  • Loading branch information
muan authored Nov 20, 2019
2 parents 4a2deca + d9fddcb commit 925b952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extended-time-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class ExtendedTimeElement extends HTMLElement {

const title = this.getFormattedTitle()
const currentTitle = this.getAttribute('title')
if (title && (!currentTitle || currentTitle === oldTitle)) {
if (attrName !== 'title' && title && (!currentTitle || currentTitle === oldTitle)) {
this.setAttribute('title', title)
}

Expand Down

0 comments on commit 925b952

Please sign in to comment.