Skip to content

Commit 2b8160f

Browse files
ia: fix panel insertion
1 parent c931b90 commit 2b8160f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/modules/ia/models/CopyrightProblemsSession.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export default class CopyrightProblemsSession extends CopyrightProblemsPage {
2929
listingMap: Map<HTMLElement, CopyrightProblemsListing> = new Map();
3030

3131
/**
32-
*
3332
* @param document
3433
*/
3534
constructor( document: Document = window.document ) {
@@ -152,9 +151,11 @@ export default class CopyrightProblemsSession extends CopyrightProblemsPage {
152151

153152
// We're now at the <p> or <div> or whatever.
154153
// Check if it only has one child (the tree that contains this element)
155-
// and if so, replace the links.
154+
// and if so, replace the links. Ignore <br/> elements.
156155

157-
if ( currentPivot.children.length > 1 ) {
156+
const children = Array.from( currentPivot.children )
157+
.filter( child => child.tagName !== 'BR' );
158+
if ( children.length > 1 ) {
158159
return;
159160
}
160161

0 commit comments

Comments
 (0)