aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/List.ts
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-05-16 13:13:50 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-05-16 13:13:50 -0400
commit4dacd1220e6a0ef73167f187f52f3b4c222c2586 (patch)
tree12d481d4d421fda6bd4490af4d0b5d77c6c1131c /src/new_fields/List.ts
parent3451ce40cbd488cede7d29b6e39594f740e366b5 (diff)
parent53351f6c5b448b93f2865eb38868bddb95ec4c1d (diff)
pulled from master and resolved
Diffstat (limited to 'src/new_fields/List.ts')
-rw-r--r--src/new_fields/List.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/new_fields/List.ts b/src/new_fields/List.ts
index 88a65eba4..70e36f911 100644
--- a/src/new_fields/List.ts
+++ b/src/new_fields/List.ts
@@ -230,6 +230,16 @@ class ListImpl<T extends Field> extends ObjectField {
const list = new Proxy<this>(this, {
set: setter,
get: listGetter,
+ ownKeys: target => Object.keys(target.__fields),
+ getOwnPropertyDescriptor: (target, prop) => {
+ if (prop in target.__fields) {
+ return {
+ configurable: true,//TODO Should configurable be true?
+ enumerable: true,
+ };
+ }
+ return Reflect.getOwnPropertyDescriptor(target, prop);
+ },
deleteProperty: deleteProperty,
defineProperty: () => { throw new Error("Currently properties can't be defined on documents using Object.defineProperty"); },
});