File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1870,10 +1870,15 @@ Phaser.Loader.prototype = {
18701870 * @method Phaser.Loader#transformUrl
18711871 * @protected
18721872 * @param {string } url - The url to transform
1873- * @return {string } The transformed url
1873+ * @return {string } The transformed url. In rare cases where the url isn't specified it will return false instead.
18741874 */
18751875 transformUrl : function ( url ) {
18761876
1877+ if ( ! url )
1878+ {
1879+ return false ;
1880+ }
1881+
18771882 if ( url . substr ( 0 , 4 ) === 'http' || url . substr ( 0 , 2 ) === '//' )
18781883 {
18791884 return url ;
@@ -2067,7 +2072,6 @@ Phaser.Loader.prototype = {
20672072 } ;
20682073
20692074 file . data . onerror = function ( ) {
2070- // file.data.removeEventListener('canplay', playThroughEvent, false);
20712075 file . data . removeEventListener ( 'canplaythrough' , playThroughEvent , false ) ;
20722076 file . data . removeEventListener ( 'loadeddata' , playThroughEvent , false ) ;
20732077 file . data . onerror = null ;
You can’t perform that action at this time.
0 commit comments