1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-18 04:35:45 +01:00

Make 'doc' available to group initializer.

This commit is contained in:
Kris Maglione
2011-08-08 12:19:01 -04:00
parent e23c96580c
commit 6debfa4132
3 changed files with 21 additions and 8 deletions

View File

@@ -611,12 +611,13 @@ function call(fn) {
*/
function memoize(obj, key, getter) {
if (arguments.length == 1) {
let res = Object.create(obj);
for each (let prop in Object.getOwnPropertyNames(obj)) {
let get = __lookupGetter__.call(obj, prop);
if (get)
memoize(obj, prop, get);
memoize(res, prop, get);
}
return obj;
return res;
}
try {