Skip to content

Commit

Permalink
Cp ie11 fixes (#9412)
Browse files Browse the repository at this point in the history
* Fix for IE11 not supporting startsWith (#9409)

* Fix webgl error for IE11 with uploading painter::emptyTexture (#9410)

Co-authored-by: Karim Naaji <karim.naaji@gmail.com>
  • Loading branch information
Ryan Hamley and karimnaaji authored Mar 12, 2020
1 parent 8f342c1 commit 53d21db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/data/program_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class CrossFadedConstantBinder implements UniformBinder {
}

getBinding(context: Context, location: WebGLUniformLocation, name: string): $Shape<Uniform<any>> {
return name.startsWith('u_pattern') ?
return name.substr(0, 9) === 'u_pattern' ?
new Uniform4f(context, location) :
new Uniform1f(context, location);
}
Expand Down
2 changes: 1 addition & 1 deletion src/render/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Painter {
this.emptyTexture = new Texture(context, {
width: 1,
height: 1,
data: new Uint8ClampedArray([0, 0, 0, 0])
data: new Uint8Array([0, 0, 0, 0])
}, context.gl.RGBA);

const gl = this.context.gl;
Expand Down

0 comments on commit 53d21db

Please sign in to comment.