File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ export default class Nav extends View {
3838
3939 /// @private
4040 $set ( node ) {
41- const href = node . getAttribute ( 'href' ) ;
42- if ( ! href || href === '#' ) {
41+ const hrefattr = node . getAttribute ( 'href' ) ;
42+ if ( ! hrefattr || hrefattr === '#' ) {
4343 node . addEventListener ( 'click' , ( evt ) => {
4444 evt . preventDefault ( ) ;
4545 evt . cancelPropogation ( ) ;
4646 this . dispatchEvent ( EVENT_CLICK , this , node . parentNode ) ;
4747 } ) ;
4848 } else {
49- const navLink = new URL ( href ) . pathname . pathSplit ( ) . join ( '/' ) ;
49+ const navLink = new URL ( node . href ) . pathname . pathSplit ( ) . join ( '/' ) ;
5050 if ( node . parentNode . id ) {
5151 this . $map . set ( navLink , node . parentNode . id ) ;
5252 }
Original file line number Diff line number Diff line change 11{
22 "name" : " @djthorpe/js-framework" ,
3- "version" : " 0.0.15 " ,
3+ "version" : " 0.0.16 " ,
44 "description" : " Javascript UI Framework" ,
55 "main" : " dist/js/index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments