mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-11 15:15:47 +01:00
Fix another DTD error.
--HG-- extra : rebase_source : 9ec78ca243151eb1a5426e29d2883f908a4a99fa
This commit is contained in:
@@ -611,13 +611,11 @@ function call(fn) {
|
|||||||
*/
|
*/
|
||||||
function memoize(obj, key, getter) {
|
function memoize(obj, key, getter) {
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
let res = Object.create(obj);
|
let res = update(Object.create(obj), obj);
|
||||||
for each (let prop in Object.getOwnPropertyNames(obj)) {
|
for each (let prop in Object.getOwnPropertyNames(obj)) {
|
||||||
let get = __lookupGetter__.call(obj, prop);
|
let get = __lookupGetter__.call(obj, prop);
|
||||||
if (get)
|
if (get)
|
||||||
memoize(res, prop, get);
|
memoize(res, prop, get);
|
||||||
else if (obj[prop] instanceof Class.Property)
|
|
||||||
Object.defineProperty(res, prop, obj[prop].init(prop, obj) || obj[prop]);
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user