Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for issue #14 #15

Merged
merged 1 commit into from

2 participants

JD Huntington Tom Moor
Tom Moor tommoor merged commit ec7d1dc into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 26, 2012
  1. JD Huntington

    When removing a DOM element, ensure element exists before calling

    jdhuntington authored jdhuntington committed
    methods on it.
    
    Fixes tommoor#14
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  tinycon.js
3  tinycon.js
View
@@ -59,7 +59,8 @@
var head = document.getElementsByTagName('head')[0];
for(var i=0, len=links.length; i < len; i++) {
- if (links[i].getAttribute('rel') === 'icon') {
+ var exists = (typeof(links[i]) !== 'undefined');
+ if (exists && links[i].getAttribute('rel') === 'icon') {
head.removeChild(links[i]);
}
}
Something went wrong with that request. Please try again.