Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren Budorick committed Aug 28, 2017
1 parent 9e2acfa commit deeed88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/source/canvas_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CanvasSource extends ImageSource {
const gl = this.context;
const data = new Uint8Array(this.width * this.height * 4);
gl.readPixels(0, 0, this.width, this.height, gl.RGBA, gl.UNSIGNED_BYTE, data);
if (!this.secondaryContext) this.secondaryContext = document.createElement('canvas').getContext('2d');
if (!this.secondaryContext) this.secondaryContext = window.document.createElement('canvas').getContext('2d');
const imageData = this.secondaryContext.createImageData(this.width, this.height);
imageData.data.set(data);
return imageData;
Expand Down

0 comments on commit deeed88

Please sign in to comment.