@@ -155,15 +155,15 @@ function getTabsFromStorage(tabs) {
155155 ui . setActiveTooltipe ( currentTab ) ;
156156}
157157
158- function getTabsForTimeChart ( targetTabs ) {
158+ function getTabsForTimeChart ( targetTabs ) {
159159 var resultArr = [ ] ;
160- targetTabs . forEach ( function ( name ) {
161- var current = name . days . forEach ( function ( item ) {
162- if ( item . date == new Date ( ) . toLocaleDateString ( "en-US" ) ) {
163- item . time . forEach ( function ( time ) {
164- resultArr . push ( { 'domain' :name . url , 'interval' :time } ) ;
160+ targetTabs . forEach ( function ( name ) {
161+ name . days . forEach ( function ( item ) {
162+ if ( item . date == new Date ( ) . toLocaleDateString ( "en-US" ) && item . time !== undefined ) {
163+ item . time . forEach ( function ( time ) {
164+ resultArr . push ( { 'domain' : name . url , 'interval' : time } ) ;
165165 } )
166- }
166+ }
167167 } ) ;
168168 } ) ;
169169 return resultArr ;
@@ -173,7 +173,7 @@ function getTabsForExpander() {
173173 storage . loadTabs ( STORAGE_TABS , getTabsFromStorageForExpander ) ;
174174}
175175
176- function drawTimeChart ( ) {
176+ function drawTimeChart ( ) {
177177 ui . drawTimeChart ( getTabsForTimeChart ( currentTabListForToday ) ) ;
178178}
179179
@@ -311,11 +311,11 @@ function getTabsByDays(tabs) {
311311 return new Date ( a . date ) - new Date ( b . date ) ;
312312 } ) ;
313313
314- var getDaysArray = function ( start , end ) {
314+ var getDaysArray = function ( start , end ) {
315315 let first = start ;
316316 let second = end ;
317317 var arr = [ ] ;
318- for ( let i = first ; i <= second ; i = new Date ( i . setDate ( i . getDate ( ) + 1 ) ) ) {
318+ for ( let i = first ; i <= second ; i = new Date ( i . setDate ( i . getDate ( ) + 1 ) ) ) {
319319 arr . push ( new Date ( i ) . toLocaleDateString ( "en-US" ) ) ;
320320 }
321321 return arr ;
0 commit comments