Skip to content

Commit

Permalink
fix default icons array for favicons
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmid committed May 27, 2020
1 parent 541c70b commit c7a7b99
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
21 changes: 10 additions & 11 deletions app-source/js/favicons.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ module.exports.generate = function ( winId, notify ) {
bookmarks = new Store( {name: 'bookmarks'} ),
bookmarkData = bookmarks.get( 'data' ),
defaultArray = store.get( 'defaultIcons' ),
defaultIcons = [],
faviconCount = 0,
faviconArray = []

Expand Down Expand Up @@ -127,12 +126,12 @@ module.exports.generate = function ( winId, notify ) {
if(err) log.info(err)
})

log.info( `favicon: ${faviconArray[i].id} - generated` )
log.info( `favicon: ${faviconArray[i].id} - generated` )

faviconCount++
if( faviconCount === arrayLength ) {

generatedFavicons( win, faviconCount, defaultIcons, notify )
generatedFavicons( win, faviconCount, defaultArray, notify )
}

} else {
Expand All @@ -141,15 +140,15 @@ module.exports.generate = function ( winId, notify ) {

log.info( `favicon: ${faviconArray[i].id} - generated` )

if( theDefault ) {
if( !defaultArray.includes( theDefault ) ) {

defaultIcons.push( theDefault )
defaultArray.push( theDefault )
}

faviconCount++
if( faviconCount === arrayLength ) {

generatedFavicons( win, faviconCount, defaultIcons, notify )
generatedFavicons( win, faviconCount, defaultArray, notify )
}
})
}
Expand All @@ -162,15 +161,15 @@ module.exports.generate = function ( winId, notify ) {

log.info( `favicon: ${faviconArray[i].id} - generated` )

if( theDefault ) {

defaultIcons.push( theDefault )
}
if( !defaultArray.includes( theDefault ) ) {
defaultArray.push( theDefault )
}

faviconCount++
if( faviconCount === arrayLength ) {

generatedFavicons( win, faviconCount, defaultIcons, notify )
generatedFavicons( win, faviconCount, defaultArray, notify )
}
})
})
Expand Down
21 changes: 10 additions & 11 deletions dist/js/favicons.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/maps/favicons.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7a7b99

Please sign in to comment.