Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 0a668d6

Browse files
committed
fix check
1 parent a3076b2 commit 0a668d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/javascript/app/base/menu.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ const Menu = (() => {
1111

1212
applyToAllElements('li', (el) => { el.classList.remove('active', 'active-parent'); }, '', menu_top);
1313
if (Client.isLoggedIn()) {
14-
// client is virtual and they are allowed to have costarica/maltainvest financial account
15-
// or client is real and current landing company is costarica/maltainvest
16-
const has_financial_markets = /costarica|maltainvest/.test(Client.get('is_virtual') ? State.getResponse('landing_company.financial_company.shortcode') : Client.get('landing_company_shortcode'));
14+
const financial_shortcode = State.getResponse('landing_company.financial_company.shortcode');
15+
// client is virtual and they are allowed to have a financial account
16+
// or client is real and current account is financial
17+
const has_financial_markets = Client.get('is_virtual') ? !!(financial_shortcode) : Client.get('landing_company_shortcode') === financial_shortcode;
1718
applyToAllElements('.financial-only', (el) => {
1819
el.setVisibility(has_financial_markets);
1920
});

0 commit comments

Comments
 (0)