Skip to content

Commit e286102

Browse files
committed
Update codeit-match-braces.js
1 parent 81cbb94 commit e286102

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/plugins/codeit-match-braces.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,18 @@
175175
const cursor = cd.dropper.cursor();
176176

177177
if (cursor && cursor.in('brace')) {
178+
178179
const currentBrace = cursor.getParent();
179180

180181
if (currentBrace.id) {
182+
181183
currentBrace.classList.add('brace-active');
182-
getPartnerBrace(currentBrace).classList.add('brace-active');
184+
185+
const partnerBrace = getPartnerBrace(currentBrace);
186+
if (partnerBrace) partnerBrace.classList.add('brace-active');
187+
183188
}
189+
184190
}
185191

186192
}

0 commit comments

Comments
 (0)