mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-07 13:45:46 +01:00
Fix possible crash when RC file can't be located. Closes issue #448.
This commit is contained in:
@@ -620,7 +620,6 @@ function memoize(obj, key, getter) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
util.reportError(e);
|
|
||||||
obj[key] = getter.call(obj, key);
|
obj[key] = getter.call(obj, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ var Contexts = Module("contexts", {
|
|||||||
completer: function (context) modules.completion.group(context)
|
completer: function (context) modules.completion.group(context)
|
||||||
});
|
});
|
||||||
|
|
||||||
memoize(modules, "userContext", function () contexts.Context(modules.io.getRCFile("~"), contexts.user, [modules, true]));
|
memoize(modules, "userContext", function () contexts.Context(modules.io.getRCFile("~", true), contexts.user, [modules, true]));
|
||||||
memoize(modules, "_userContext", function () contexts.Context(modules.io.getRCFile("~"), contexts.user, [modules.userContext]));
|
memoize(modules, "_userContext", function () contexts.Context(modules.io.getRCFile("~", true), contexts.user, [modules.userContext]));
|
||||||
},
|
},
|
||||||
|
|
||||||
cleanup: function () {
|
cleanup: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user