Skip to content

Commit

Permalink
prefix img path fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Lmendev committed Jul 9, 2022
1 parent a279fae commit 884fc42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/modules/calculator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Calculator {

handleCoinIcon () {
let coin = blockReward[this.DOMElements.selectBlockReward.value]
let prefix = window.location.pathname.split('/').filter(s => s && s !== 'index.html').pop() === 'es'? '../' : '.'
let prefix = window.location.pathname.split('/').filter(s => s && s !== 'index.html').pop() === 'es'? '..' : '.'

this.DOMElements.coinIcon.src = prefix + "/img/" + coin.icon
this.DOMElements.coinIcon.alt = coin.name + " icon"
Expand Down

0 comments on commit 884fc42

Please sign in to comment.