Skip to content

Commit 22dceb4

Browse files
committed
fix(tabs): check for null content
1 parent ab5dfaa commit 22dceb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tabs.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ export class Tabs extends Component<TabsOptions> {
207207
this._index = Math.max(Array.from(this._tabLinks).indexOf(this._activeTabLink), 0);
208208
if (this._activeTabLink && this._activeTabLink.hash) {
209209
this._content = document.querySelector(this._activeTabLink.hash);
210-
this._content.classList.add('active');
210+
if (this._content)
211+
this._content.classList.add('active');
211212
}
212213
}
213214

0 commit comments

Comments
 (0)