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 {
38
38
39
39
/// @private
40
40
$set ( node ) {
41
- const href = node . getAttribute ( 'href' ) ;
42
- if ( ! href || href === '#' ) {
41
+ const hrefattr = node . getAttribute ( 'href' ) ;
42
+ if ( ! hrefattr || hrefattr === '#' ) {
43
43
node . addEventListener ( 'click' , ( evt ) => {
44
44
evt . preventDefault ( ) ;
45
45
evt . cancelPropogation ( ) ;
46
46
this . dispatchEvent ( EVENT_CLICK , this , node . parentNode ) ;
47
47
} ) ;
48
48
} else {
49
- const navLink = new URL ( href ) . pathname . pathSplit ( ) . join ( '/' ) ;
49
+ const navLink = new URL ( node . href ) . pathname . pathSplit ( ) . join ( '/' ) ;
50
50
if ( node . parentNode . id ) {
51
51
this . $map . set ( navLink , node . parentNode . id ) ;
52
52
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @djthorpe/js-framework" ,
3
- "version" : " 0.0.15 " ,
3
+ "version" : " 0.0.16 " ,
4
4
"description" : " Javascript UI Framework" ,
5
5
"main" : " dist/js/index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments