diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-09-11 11:42:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-11 11:42:17 +0200 |
commit | 200b9cde88da485659a6376266af8e9bf7be186f (patch) | |
tree | 552a7fa28a8078e44fb545f8ac6a459d32516bb8 /platform/web/js/engine/config.js | |
parent | c658fa8b77eb701ddb504cba14fe2c966b7bb105 (diff) | |
parent | 27f22b29f866d5cd807e70289ab771dabc79207c (diff) |
Merge pull request #65644 from Faless/web/4.x_misc_alpha_fixes
[Web] Small fixes and enhancements.
Diffstat (limited to 'platform/web/js/engine/config.js')
-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'); |