diff options
Diffstat (limited to 'platform/web/js/engine')
-rw-r--r-- | platform/web/js/engine/config.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js index 9c4b6c2012..41be7b2512 100644 --- a/platform/web/js/engine/config.js +++ b/platform/web/js/engine/config.js @@ -317,7 +317,8 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- if (!(this.canvas instanceof HTMLCanvasElement)) { const nodes = document.getElementsByTagName('canvas'); if (nodes.length && nodes[0] instanceof HTMLCanvasElement) { - this.canvas = nodes[0]; + const first = nodes[0]; + this.canvas = /** @type {!HTMLCanvasElement} */ (first); } if (!this.canvas) { throw new Error('No canvas found in page'); |