Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/core/src/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ function arrayImplementation<T>(arr: Y.Array<T>) {

const ret = [];
for (let method in methods) {
ret[method] = methods[method];
Object.defineProperty(ret, method, {
value: methods[method],
writable: true,
configurable: true
})
}

// this is necessary to prevent errors like "trap reported non-configurability for property 'length' which is either non-existent or configurable in the proxy target" when adding support for ownKeys and Reflect.keysx
Expand Down