Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Now checking if there are any links
Browse files Browse the repository at this point in the history
  • Loading branch information
iAbadia committed May 9, 2018
1 parent 9ace922 commit f414dc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions linkSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ function sortLinks(type) {
var linksContainer = document.getElementById(type);
var links = linksContainer.getElementsByTagName('a');

// Check for no links
if(links.length == 0) {
return;
}

// Insert new section at the beginning
var st = linksContainer.getElementsByTagName('h4')
var h = document.createElement("H4");
Expand Down

0 comments on commit f414dc3

Please sign in to comment.