Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js |
— | — | @@ -334,8 +334,14 @@ |
335 | 335 | isSourceEnabled: function( source ){ |
336 | 336 | for(var i in this.enabledSources ){ |
337 | 337 | var enabledSource = this.enabledSources[i]; |
338 | | - if( source.id == enabledSource.id ) |
339 | | - return true; |
| 338 | + if( source.id ){ |
| 339 | + if( source.id == enabledSource.id ) |
| 340 | + return true; |
| 341 | + } |
| 342 | + if( source.lang ){ |
| 343 | + if( source.lang == enabledSource.lang ) |
| 344 | + return true; |
| 345 | + } |
340 | 346 | } |
341 | 347 | return false; |
342 | 348 | }, |