Skip to content

Commit

Permalink
fix: access array index proxy prop
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsisexistence committed Oct 3, 2020
1 parent 06f4fd0 commit 0059b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/src/core/getRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const getRoutes = <T>(): T => {
case path === Symbol.iterator:
return Array.prototype[Symbol.iterator].bind(targetArray);

case path in targetArray: {
case path in Array.prototype: {
const updatedTargetPath = Array.prototype[path as any].bind(targetArray);
Object.defineProperty(updatedTargetPath, 'length', { get: () => targetArray.length + 1 });
const nextTuple = [...targetArray, path];
Expand Down

0 comments on commit 0059b1e

Please sign in to comment.