Skip to content

Commit

Permalink
Only swap charts after iframe loads (fixes "Error fetching quote:[obj…
Browse files Browse the repository at this point in the history
…ect Object]" alert)
  • Loading branch information
nirvana-tikku committed Aug 21, 2017
1 parent 70040f8 commit b18d7f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion enhancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ Enhancer.getDataProcessors = function getDataProcessors(proc, opts){
case 'market':
return function(doc){
if(opts.tvChart){
Enhancer.swapCharts();
let chartIframe = document.getElementById('ifrm');
chartIframe.onload = function(){ Enhancer.swapCharts(); };
}
if(opts.usdVal){
Enhancer.interval = setInterval(function(){
Expand Down

0 comments on commit b18d7f2

Please sign in to comment.