Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DTRA] Farhan/DTRA-1015/[TrackJs] SmartTrader - Cannot read properties of undefined (reading 'currency') #631

Conversation

farhan-nurzi-deriv
Copy link
Contributor

@farhan-nurzi-deriv farhan-nurzi-deriv commented Apr 15, 2024

Changes:

  • Fix the trackjs error: Cannot read properties of undefined (reading 'currency')

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@farhan-nurzi-deriv farhan-nurzi-deriv requested a review from a team as a code owner April 15, 2024 05:10
Comment on lines 73 to 74
const new_currency = JSON.parse(evt.newValue)[active_loginid] ? JSON.parse(evt.newValue)[active_loginid].currency : '';
const old_currency = JSON.parse(evt.oldValue)[active_loginid] ? JSON.parse(evt.oldValue)[active_loginid].currency : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid doing JSON.parse multiple times?

Copy link

Preview Link: https://pr-631.smarttrader-preview.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

@balakrishna-deriv balakrishna-deriv merged commit 653a6fc into deriv-com:master Apr 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants