Skip to content

Commit

Permalink
fix print width
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Chernitskiy committed May 17, 2021
1 parent 986bb21 commit a3a66f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Shader.js
Expand Up @@ -63,13 +63,12 @@ class Shader {
* @ignore
*/
_compile(gl) {
const glType =
this.type === Shader.Vertex ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER;
const glType = this.type === Shader.Vertex ? gl.VERTEX_SHADER : gl.FRAGMENT_SHADER;
const shader = (this._shader = gl.createShader(glType));

if (!shader || gl.isContextLost()) {
throw new Error(
`[2gl] Failed to create shader. Shader is null: ${!shader}. Context is lost: ${gl.isContextLost()}`
`[2gl] Failed to create shader. Shader is null: ${!shader}. Context is lost: ${gl.isContextLost()}`,
);
}

Expand Down

0 comments on commit a3a66f3

Please sign in to comment.