Permalink
Browse files

watch for errors or empty directory

  • Loading branch information...
1 parent d0cfbab commit f8a27928ccf1f6244be5052d12b7e004b47eb63d @WardCunningham committed Jan 27, 2013
Showing with 18 additions and 10 deletions.
  1. +2 −1 client/plugins/linkmap/server.coffee
  2. +16 −9 client/plugins/linkmap/server.js
@@ -24,7 +24,8 @@ findLinks = (page) ->
buildmap = (pages) ->
fs.readdir pages, (err, names) ->
- for slug in names?
+ return if err or !names?.length
+ for slug in names
if slug.match /^[a-z0-9-]+$/
do (slug) ->
fetchPage "#{pages}/#{slug}", (page) ->

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit f8a2792

Please sign in to comment.