aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-09-07 15:26:18 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2011-09-07 15:26:18 -0400
commitd04fb464d6e18387b9d7979912682bd50fb2f6c1 (patch)
tree48e70df945ec655dc2dda9a88ecbb6ae7b212ecb
parentUpdate readme (diff)
downloadwiki-philosophy-master.tar.xz
wiki-philosophy-master.zip
Account for occational jquery failure.HEADmaster
-rw-r--r--wiki-philosophy.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/wiki-philosophy.js b/wiki-philosophy.js
index ee81810..1772ec3 100644
--- a/wiki-philosophy.js
+++ b/wiki-philosophy.js
@@ -33,7 +33,11 @@ function search(page)
if (found)
return;
console.log("Fetched " + page.word);
- var $ = window.$;
+ var $ = window.$;
+ if ($ === undefined || $ == null) {
+ console.error("jQuery failed to load");
+ return;
+ }
if ($("#bodyContent .redirectMsg").length > 0) {
// This page is a redirect page, follow the redirect
var components = $("#bodyContent .redirectText > a").attr("href").split('/');