Repository navigation
Commit a575c05
committed
fix(octane): require lone font child in isTextLeaf
Chrome Translate replaces a single Text node with one <font> wrapper,
so the replacement has no next sibling. The predicate checked only that
the first child was a <font> without verifying it was the only child,
letting a <font> followed by extra siblings pass as a valid text leaf.
Add the missing !first.nextSibling guard to the font branch, matching
the existing guard on the Text-node branch.1 parent 9593d6b commit a575c05
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
| |||
0 commit comments