fix CR issues

pull/2324/head
Ayrat Badykov 5 years ago
parent 6813d70270
commit 8662a053e3
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/block_scout_web/assets/js/lib/market_history_chart.js
  2. 4
      apps/block_scout_web/assets/js/pages/chain.js

@ -129,6 +129,9 @@ class MarketHistoryChart {
export function createMarketHistoryChart (el) {
const dataPath = el.dataset.market_history_chart_path
const $chartLoading = $('[data-chart-loading-message]')
$chartLoading.removeAttr('hidden')
const $chartError = $('[data-chart-error-message]')
const chart = new MarketHistoryChart(el, 0, [])
$.getJSON(dataPath, {type: 'JSON'})
@ -148,7 +151,6 @@ export function createMarketHistoryChart (el) {
}
$('[data-chart-error-message]').on('click', _event => {
$('[data-chart-loading-message]').removeAttr('hidden')
$('[data-chart-loading-message]').show()
$('[data-chart-error-message]').hide()
createMarketHistoryChart($('[data-chart="marketHistoryChart"]')[0])

@ -210,7 +210,7 @@ const elements = {
},
'[data-selector="chain-block-list"] [data-selector="loading-message"]': {
render ($el, state, oldState) {
if (state.blocksLoading) {
if (state && state.blocksLoading) {
setTimeout(function () {
$el.removeAttr('hidden')
$el.show()
@ -227,7 +227,7 @@ const elements = {
},
'[data-selector="transactions-list"] [data-selector="loading-message"]': {
render ($el, state, oldState) {
if (state.transactionsLoading) {
if (state && state.transactionsLoading) {
setTimeout(function () {
$el.removeAttr('hidden')
$el.show()

Loading…
Cancel
Save