From 899d9c127e4097817754c84134cc0731f0a07ef3 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Tue, 22 Nov 2011 01:29:50 -0500 Subject: [PATCH] forgot that regexp.match returns null when it doesn't find anything --- version.rkt | 2 +- web-world/js-impl.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/version.rkt b/version.rkt index b22d90f..747a024 100644 --- a/version.rkt +++ b/version.rkt @@ -7,4 +7,4 @@ (provide version) (: version String) -(define version "1.90") +(define version "1.93") diff --git a/web-world/js-impl.js b/web-world/js-impl.js index ce72aef..4432f2f 100644 --- a/web-world/js-impl.js +++ b/web-world/js-impl.js @@ -656,8 +656,10 @@ // to avoid any 'Permission Denied' errors in IE div.innerHTML = str.replace(rscript, "").replace(rlink, ""); var linkMatches = str.match(rlink); - for (var i = 0; i < linkMatches.length; i++) { - $(div).append($(linkMatches[i])); + if (linkMatches) { + for (var i = 0; i < linkMatches.length; i++) { + $(div).append($(linkMatches[i])); + } } return $(div); };