From 7271c25bf34917b1751f433d284f21485057425b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 6 Mar 2012 11:24:25 -0800 Subject: Fixing WebGL not available bug --- js/mediators/io-mediator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/mediators/io-mediator.js') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 23668e13..097f5975 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -153,7 +153,7 @@ exports.IoMediator = Montage.create(Component, { switch (file.mode) { case 'html': //Copy webGL library if needed - if (file.webgl.length > 0) { + if (file.webgl && file.webgl.length > 0) { for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { //Checking for RDGE library to be available if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { @@ -353,7 +353,7 @@ exports.IoMediator = Montage.create(Component, { } } //Checking for webGL elements in document - if (template.webgl.length) { + if (template.webgl && template.webgl.length) { // var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script'); // -- cgit v1.2.3