diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index f5295ff4..bcf420d7 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -496,7 +496,7 @@ const Dactyl = Module("dactyl", {
let body = XML();
for (let [, context] in Iterator(plugins.contexts))
- if (context.INFO instanceof XML)
+ if (context && context.INFO instanceof XML)
body +=
{context.INFO.@summary}
+
context.INFO;
diff --git a/common/content/io.js b/common/content/io.js
index 5f4ab0db..6660ecac 100644
--- a/common/content/io.js
+++ b/common/content/io.js
@@ -9,25 +9,26 @@
/** @scope modules */
-plugins.contexts = plugins;
+plugins.contexts = {};
function Script(file) {
let self = plugins[file.path];
if (self) {
if (self.onUnload)
self.onUnload();
- return self;
}
- else
- self = { __proto__: plugins };
- plugins[file.path] = self;
- self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase());
- self.PATH = file.path;
- self.CONTEXT = self;
+ else {
+ self = { __proto__: plugins };
+ plugins[file.path] = self;
+ self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase());
+ self.PATH = file.path;
+ self.CONTEXT = self;
- // This belongs elsewhere
- if (io.getRuntimeDirectories("plugins").some(
- function (dir) dir.contains(file, false)))
- plugins[self.NAME] = self;
+ // This belongs elsewhere
+ if (io.getRuntimeDirectories("plugins").some(
+ function (dir) dir.contains(file, false)))
+ plugins[self.NAME] = self;
+ }
+ plugins.contexts[file.path] = self;
return self;
}