Skip to content

Commit 8ed4e4b

Browse files
author
Zibi Braniecki
committed
Only add mutations to pendingElements on attribute mutation if data-l10n-id is set
1 parent 83b1d1d commit 8ed4e4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fluent-dom/src/dom_localization.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ export default class DOMLocalization extends Localization {
199199
for (const mutation of mutations) {
200200
switch (mutation.type) {
201201
case "attributes":
202-
this.pendingElements.add(mutation.target);
202+
if (mutation.target.hasAttribute("data-l10n-id")) {
203+
this.pendingElements.add(mutation.target);
204+
}
203205
break;
204206
case "childList":
205207
for (const addedNode of mutation.addedNodes) {

0 commit comments

Comments
 (0)