Skip to content

Commit 13aa9c5

Browse files
committed
Fix icon uses all strategies instead of only the first success strategy
1 parent ff8ed8a commit 13aa9c5

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.2]
9+
10+
Fixed
11+
12+
- Fix icon uses all strategies instead of only the first success strategy
13+
814
## [1.0.1]
915

1016
Added

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hyperjumptech/favicon-fetcher",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A utility to fetch a website's favicon",
55
"main": "dist/index.js",
66
"scripts": {

src/get-favicon.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export async function getFavicon(
7777
return Buffer.from(ab)
7878
})
7979

80-
icon = result
80+
if (result) {
81+
icon = result
82+
break
83+
}
8184

8285
// Else, use another strategy
8386
continue

0 commit comments

Comments
 (0)