From cb8c39e5f33b3545d39ed235c467c45ed6076e51 Mon Sep 17 00:00:00 2001 From: farabi-deriv Date: Tue, 15 Jul 2025 16:29:16 +0800 Subject: [PATCH 1/2] fix: cannot call method on tab prior to initialization --- build/connect.js | 4 ++-- src/javascript/app/pages/user/update_total.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/connect.js b/build/connect.js index 830be675402..860eb28546d 100644 --- a/build/connect.js +++ b/build/connect.js @@ -10,14 +10,14 @@ module.exports = function (grunt) { livereload: { options: { hostname : '0.0.0.0', - port : 8090, + port : 8443, protocol : 'https', base : 'dist', open : { appName: { name: 'Google\ Chrome' }, - target : 'https://localhost:8090', + target : 'https://localhost:8443', }, middleware: (connect, options) => { const middlewares = [ diff --git a/src/javascript/app/pages/user/update_total.js b/src/javascript/app/pages/user/update_total.js index 2a91e0f3260..e08828c1222 100644 --- a/src/javascript/app/pages/user/update_total.js +++ b/src/javascript/app/pages/user/update_total.js @@ -7,7 +7,8 @@ let total_currency_virtual = 'USD'; let total_currency_real; const updateTotal = (total) => { - const is_demo_tab = $('#acc_tabs').data('ui-tabs') ? $('#acc_tabs').tabs('option', 'active') === 1 : false; + const acc_tabs_element = $('#acc_tabs'); + const is_demo_tab = acc_tabs_element.length && acc_tabs_element.data('ui-tabs') ? acc_tabs_element.tabs('option', 'active') === 1 : false; const el_total_amount = $('#account__switcher-total-balance-amount'); const all_login_ids = Client.getAllLoginids(); const real_accounts = all_login_ids.filter((loginid) => !/^VRT/.test(loginid)); From e3b1e3681de8e1c286ea2ab54f5d39906594d81c Mon Sep 17 00:00:00 2001 From: farabi-deriv Date: Tue, 15 Jul 2025 16:31:02 +0800 Subject: [PATCH 2/2] fix: revert port changes --- build/connect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/connect.js b/build/connect.js index 860eb28546d..830be675402 100644 --- a/build/connect.js +++ b/build/connect.js @@ -10,14 +10,14 @@ module.exports = function (grunt) { livereload: { options: { hostname : '0.0.0.0', - port : 8443, + port : 8090, protocol : 'https', base : 'dist', open : { appName: { name: 'Google\ Chrome' }, - target : 'https://localhost:8443', + target : 'https://localhost:8090', }, middleware: (connect, options) => { const middlewares = [