File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class ChannelsList extends HTMLElement {
12
12
13
13
attributeChangedCallback ( name , _ , newValue ) {
14
14
if ( name === 'data-list' ) {
15
- const channels = newValue . split ( ',' ) . filter ( Boolean )
15
+ const channels = JSON . parse ( newValue ) . filter ( Boolean )
16
16
channels . sort ( ( a , b ) => a . toLowerCase ( ) . localeCompare ( b . toLowerCase ( ) ) )
17
17
this . channels = channels
18
18
this . render ( )
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ const routes = {
33
33
const channelsList = videos . reduce ( ( acc , video ) => {
34
34
if ( ! acc . includes ( video . channelName ) ) acc . push ( video . channelName )
35
35
return acc
36
- } , [ ] ) . join ( ',' )
37
- document . querySelector ( 'channels-list' ) . dataset [ 'list' ] = channelsList
36
+ } , [ ] )
37
+ document . querySelector ( 'channels-list' ) . dataset [ 'list' ] = JSON . stringify ( channelsList )
38
38
39
39
window . utils . applyShowThumbnails ( store . get ( store . showThumbnailsKey ) )
40
40
window . utils . applyShowBigPlayer ( store . get ( store . showBigPlayerKey ) )
You can’t perform that action at this time.
0 commit comments