Skip to content

Commit

Permalink
Fixed DOM racecondition
Browse files Browse the repository at this point in the history
Fixed #2
  • Loading branch information
Rick Pastoor committed Sep 7, 2015
1 parent b6b174c commit 8982f6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrummer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ var listChangeObserver = new MutationObserver(function (mutations) {
// If the list was modified, recalculate
if (mutation.target.classList.contains('list-cards') ||
mutation.target.classList.contains('list-header-num-cards')) {
setTimeout(calculateStoryPointsForBoardDebounced, 250);
setTimeout(calculateStoryPointsForBoardDebounced);
return;
}

// If a single card's content is mutated
if (mutation.target.classList.contains('js-card-name')) {
mutation.target.setAttribute('data-mutated', 1);

calculateStoryPointsForBoardDebounced();
setTimeout(calculateStoryPointsForBoardDebounced);
}
});
});
Expand Down

0 comments on commit 8982f6e

Please sign in to comment.