New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the animation state _running
sometimes stay false
every time I call it
#49
Comments
Does it happen only for animation type 'none' or also for others? |
I don't think so. I justed tried but animations with
|
I think my issue can be fixed by resetting /**
* Set badge
*/
var badge = function(number, opts) {
opts = ((typeof opts)==='string' ? {animation:opts} : opts) || {};
_readyCb = function() {
try {
if (typeof(number)==='number' ? (number > 0) : (number !== '')) {
//
// too long...
//
_queue.push(q);
icon.start();
} else {
icon.reset();
_running = false; // <-- I added two lines here
console.log((new Date()).toISOString(), 'running -> false, forced');
}
} catch(e) {
throw 'Error setting badge. Message: ' + e.message;
}
};
if (_ready) {
_readyCb();
}
}; |
Good catch! |
Any status updates on getting this merged? |
reset _running state when reset icon; fixes #49
Merged. I will do few more fixes this weekend. |
I initialized with Favico like this:
but to find the badge not appearing when I call
favicon.badge(3)
. I debugged intofavico.js
but found the state__running
stayfalse
just like thatfinished
function was never called.But I failed to locate the problem. It happens in Chrome and Firefox but does not happen every time.
Looks like when I called it too frequenly and it breaks. Anyone run into this?
The text was updated successfully, but these errors were encountered: