1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-31 03:42:27 +01:00

Fix another DTD error.

--HG--
extra : rebase_source : 9ec78ca243151eb1a5426e29d2883f908a4a99fa
This commit is contained in:
Kris Maglione
2011-08-10 10:07:05 -04:00
parent fd9fa1ebe9
commit 98bb3efa2e

View File

@@ -611,13 +611,11 @@ function call(fn) {
*/
function memoize(obj, key, getter) {
if (arguments.length == 1) {
let res = Object.create(obj);
let res = update(Object.create(obj), obj);
for each (let prop in Object.getOwnPropertyNames(obj)) {
let get = __lookupGetter__.call(obj, prop);
if (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;
}