Skip to content

Commit 0fef2a6

Browse files
committed
Exit if no DOM nodes found
1 parent 219d9f9 commit 0fef2a6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ class Codeplus {
270270

271271
if (this.debug) console.log("Codeplus DOM nodes selected", this.domNodes);
272272

273+
if (this.domNodes.length === 0) return;
274+
273275
this.groups = this.getGroups(
274276
Array.from(this.domNodes).map(
275277
(node) =>

0 commit comments

Comments
 (0)