Index: trunk/extensions/MobileFrontend/javascripts/application.js |
— | — | @@ -35,10 +35,12 @@ |
36 | 36 | if( document.querySelectorAll ) { |
37 | 37 | return [].slice.call( document.querySelectorAll( el ) ); |
38 | 38 | } |
| 39 | + } else if( !el ) { |
| 40 | + el = document.createElement( 'div' ); |
39 | 41 | } |
40 | 42 | |
41 | 43 | function hasClass( name ) { |
42 | | - var classNames = el.className.split( '' ); |
| 44 | + var classNames = el.className.split( ' ' ); |
43 | 45 | return classNames.indexOf( name ) > -1; |
44 | 46 | } |
45 | 47 | |