From 5053f203d9db23ac2f4c5139fba5bf1c775880ee Mon Sep 17 00:00:00 2001 From: OskarAhl Date: Tue, 4 Jun 2019 11:10:35 +0800 Subject: [PATCH] update naming --- .../app/Stores/Modules/Portfolio/portfolio-store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/javascript/app/Stores/Modules/Portfolio/portfolio-store.js b/src/javascript/app/Stores/Modules/Portfolio/portfolio-store.js index ea7a31491714..b2f3a11a8f77 100644 --- a/src/javascript/app/Stores/Modules/Portfolio/portfolio-store.js +++ b/src/javascript/app/Stores/Modules/Portfolio/portfolio-store.js @@ -193,9 +193,9 @@ export default class PortfolioStore extends BaseStore { @action.bound removePositionById(contract_id) { const { is_contract_mode } = this.root_store.modules.smart_chart; - const i = this.getPositionIndexById(contract_id); + const contract_idx = this.getPositionIndexById(contract_id); - this.positions.splice(i, 1); + this.positions.splice(contract_idx, 1); // check if contract is in view in contract_mode before removing contract details from chart if (is_contract_mode && (+this.root_store.modules.contract.contract_id === +contract_id)) {