Skip to content

Commit

Permalink
fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
sp4ghet committed Sep 4, 2017
1 parent 77b7820 commit adc9224
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/glsl-livecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ export default class GlslLivecoder {
* @private
*/
loadShaderOfEditor(editor: TextEditor): void {
if(editor == undefined){
// This case occurs when no files are open/active
return;
}
const path = editor.getPath();
const m = (path || '').match(/(\.(?:glsl|frag|vert))$/);
if (!m) {
Expand Down

0 comments on commit adc9224

Please sign in to comment.