Skip to content

Commit

Permalink
Merge pull request #43030 from rushatgabhane/help-lhn
Browse files Browse the repository at this point in the history
[HelpDot] add undefined checks
  • Loading branch information
srikarparsi authored Jun 4, 2024
2 parents 1fcd788 + 33b4785 commit 9c091d4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ function selectNewExpensify(newExpensifyTab, newExpensifyContent, expensifyClass
newExpensifyTab.classList.add('active');
newExpensifyContent.classList.remove('hidden');

expensifyClassicTab.classList.remove('active');
expensifyClassicContent.classList.add('hidden');
if (expensifyClassicTab && expensifyClassicContent) {
expensifyClassicTab.classList.remove('active');
expensifyClassicContent.classList.add('hidden');
}
window.tocbot.refresh({
...tocbotOptions,
contentSelector: '#new-expensify',
Expand All @@ -212,8 +214,11 @@ function selectExpensifyClassic(newExpensifyTab, newExpensifyContent, expensifyC
expensifyClassicTab.classList.add('active');
expensifyClassicContent.classList.remove('hidden');

newExpensifyTab.classList.remove('active');
newExpensifyContent.classList.add('hidden');
if (newExpensifyTab && newExpensifyContent) {
newExpensifyTab.classList.remove('active');
newExpensifyContent.classList.add('hidden');
}

window.tocbot.refresh({
...tocbotOptions,
contentSelector: '#expensify-classic',
Expand Down

0 comments on commit 9c091d4

Please sign in to comment.