File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "homepage" : " https://materializeweb.com" ,
66 "version" : " 2.0.3" ,
77 "main" : " dist/js/materialize.js" ,
8- "module" : " src/index.ts" ,
98 "style" : " dist/css/materialize.css" ,
109 "sass" : " sass/materialize.scss" ,
1110 "typings" : " dist/src/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ export class Tabs extends Component<TabsOptions> {
207207 this . _index = Math . max ( Array . from ( this . _tabLinks ) . indexOf ( this . _activeTabLink ) , 0 ) ;
208208 if ( this . _activeTabLink && this . _activeTabLink . hash ) {
209209 this . _content = document . querySelector ( this . _activeTabLink . hash ) ;
210- this . _content . classList . add ( 'active' ) ;
210+ if ( this . _content )
211+ this . _content . classList . add ( 'active' ) ;
211212 }
212213 }
213214
Original file line number Diff line number Diff line change @@ -154,12 +154,12 @@ <h5>Dynamically generated Select-Options <button class="btn3">Create + Init Sele
154154
155155 < script type ="text/javascript ">
156156 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
157- var elems = document . querySelectorAll ( 'select' ) ;
157+ const elems = document . querySelectorAll ( 'select' ) ;
158158
159159 elems [ 0 ] . addEventListener ( 'change' , e => console . log ( "First Select changed!" ) ) ;
160160 elems [ 1 ] . addEventListener ( 'change' , e => console . log ( "Second Select changed!" ) ) ;
161161
162- var instances = M . FormSelect . init ( elems , {
162+ const instances = M . FormSelect . init ( elems , {
163163 // specify options here
164164 } ) ;
165165 // Methods
You can’t perform that action at this time.
0 commit comments