Skip to content

Commit 93e673c

Browse files
authored
Merge pull request #461 from danice/tabs-fix
very small fix for tabs: check for null content
2 parents 2b62d6e + 22dceb4 commit 93e673c

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)