aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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('/');