File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -195,9 +195,14 @@ export default async function ({ feature, console }) {
195195 return tagText !== text ;
196196 } ) ;
197197 tag . remove ( )
198+ if ( filterData [ id ] [ type ] . length == 0 ) {
199+ delete filterData [ id ] [ type ]
200+ }
201+ if ( Object . keys ( filterData [ id ] ) . length == 0 ) {
202+ if ( button . classList . contains ( 'active' ) ) button . classList . remove ( 'active' )
203+ }
204+ console . log ( filterData )
198205 filter ( ) ;
199- if ( filterData [ id ] [ type ] . length == 0 ) delete filterData [ id ] [ type ]
200- if ( Object . keys ( filterData [ id ] ) . length == 0 ) { if ( button . classList . contains ( 'active' ) ) button . classList . remove ( 'active' ) }
201206 } )
202207 tags . appendChild ( tag )
203208 }
@@ -300,8 +305,8 @@ export default async function ({ feature, console }) {
300305 resetButton . addEventListener ( "click" , function ( ) {
301306 input . value = ''
302307 if ( filterData . period [ id ] ) delete filterData . period [ id ] ;
303- filter ( )
304308 if ( Object . keys ( filterData [ "period" ] ) . length == 0 ) { if ( button . classList . contains ( 'active' ) ) button . classList . remove ( 'active' ) }
309+ filter ( )
305310 } ) ;
306311 content . appendChild ( input ) ;
307312 content . appendChild ( resetButton ) ;
You can’t perform that action at this time.
0 commit comments