Skip to content

Commit

Permalink
Only insert if it found sections, otherwise log a fail message
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmynotjim committed Jan 7, 2013
1 parent 8ee637b commit b3737bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jquery.sectionNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@

// Now add the nav to our page

$nav.insertBefore($container);
if ($sections) {
$nav.insertBefore($container);
}
else {
console.log('Build failed, could not find any sections');
}

// Add Scrolling //

Expand Down

0 comments on commit b3737bf

Please sign in to comment.