Permalink
Browse files

typecheck safety

  • Loading branch information...
1 parent fa2f415 commit a4a5dc3b666bc5bcba734cae68902a96d6d1cccd Davis committed Jul 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/antinode.js
View
@@ -28,7 +28,7 @@ var server;
function load_hostspecific_handlers() {
for (var host in settings.hosts) {
var script = settings.hosts[host]['handler'];
- if (script !== undefined) {
+ if (script !== undefined && typeof script === 'string') {
/* remove filename extension */
var require_name = script.match(/(.*)\..*/)[1];
settings.hosts[host].handler = require(require_name);

0 comments on commit a4a5dc3

Please sign in to comment.