Skip to content

Commit

Permalink
fix: animation property toggle working
Browse files Browse the repository at this point in the history
  • Loading branch information
oflisback committed Mar 12, 2023
1 parent 40131f5 commit aafd192
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
Expand Down
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,16 @@ class Favicon extends React.Component {

var currentUrl

if (activeInstance.props.url instanceof Array) {
var isAnimated =
activeInstance.props.url instanceof Array && activeInstance.props.animated

if (isAnimated) {
currentUrl = activeInstance.props.url[activeInstance.state.animationIndex]
} else {
currentUrl = activeInstance.props.url
currentUrl =
activeInstance.props.url instanceof Array
? activeInstance.props.url[0]
: activeInstance.props.url
}

if (activeInstance.props.alertCount || activeInstance.props.renderOverlay) {
Expand Down

0 comments on commit aafd192

Please sign in to comment.