<commit_before>import { Component } from '@angular/core'
import * as jwt_decode from 'jwt-decode'

@Component({
  selector: 'app-last-login-ip',
  templateUrl: './last-login-ip.component.html',
  styleUrls: ['./last-login-ip.component.scss']

})

export class LastLoginIpComponent {

  lastLoginIp: string = '?'

  ngOnInit () {
    this.parseAuthToken()
  }

  parseAuthToken () {
    let payload = {} as any
    if (localStorage.getItem('token')) {
      payload = jwt_decode(localStorage.getItem('token'))
      if (payload.data.lastLoginIp) {
        this.lastLoginIp = payload.data.lastLoginIp
      }
    }
  }

}<commit_msg>Avoid double access to local storage to prevent interference in between<commit_after>import { Component } from '@angular/core'
import * as jwt_decode from 'jwt-decode'

@Component({
  selector: 'app-last-login-ip',
  templateUrl: './last-login-ip.component.html',
  styleUrls: ['./last-login-ip.component.scss']

})

export class LastLoginIpComponent {

  lastLoginIp: string = '?'

  ngOnInit () {
    this.parseAuthToken()
  }

  parseAuthToken () {
    let payload = {} as any
    const token = localStorage.getItem('token')
    if (token) {
      payload = jwt_decode(token)
      if (payload.data.lastLoginIp) {
        this.lastLoginIp = payload.data.lastLoginIp
      }
    }
  }

}
{'fraction_non_alphanumeric': 0.1393939393939394, 'fraction_numerical': 0.0, 'mean_word_length': 3.233974358974359, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4552273', 'n_tokens_mistral': 438, 'n_tokens_neox': 435, 'n_words': 85}