# HG changeset patch # User Matt Mackall # Date 2012-10-02 04:05:02 # Node ID fa714f3ed2989aff64c267c9935251d9fc4f31ee # Parent 0c6de45e12127d5f64327775f734cedb5d5ef2ff hgweb: change IE canvas test (issue3639) suggested by Peter Hull diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js --- a/mercurial/templates/static/mercurial.js +++ b/mercurial/templates/static/mercurial.js @@ -25,7 +25,7 @@ var colors = [ function Graph() { this.canvas = document.getElementById('graph'); - if (navigator.userAgent.indexOf('MSIE') >= 0) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas); + if (window.G_vmlCanvasManager) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas); this.ctx = this.canvas.getContext('2d'); this.ctx.strokeStyle = 'rgb(0, 0, 0)'; this.ctx.fillStyle = 'rgb(0, 0, 0)';