aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Schema.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_fields/Schema.ts')
-rw-r--r--src/new_fields/Schema.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/new_fields/Schema.ts b/src/new_fields/Schema.ts
index 5081521c7..7444878fe 100644
--- a/src/new_fields/Schema.ts
+++ b/src/new_fields/Schema.ts
@@ -21,15 +21,15 @@ export function makeInterface<T extends Interface[]>(...schemas: T): (doc?: Doc)
}
}
const proto = new Proxy({}, {
- get(target: any, prop) {
- const field = target.doc[prop];
+ get(target: any, prop, receiver) {
+ const field = receiver.doc[prop];
if (prop in schema) {
return Cast(field, (schema as any)[prop]);
}
return field;
},
- set(target: any, prop, value) {
- target.doc[prop] = value;
+ set(target: any, prop, value, receiver) {
+ receiver.doc[prop] = value;
return true;
}
});