Skip to content

Commit

Permalink
Merge pull request #1304 from glimmerjs/bugfix/remove-unnecessary-ass…
Browse files Browse the repository at this point in the history
…ertion

Remove unnecessary property descriptor assertion from hash
  • Loading branch information
Chris Garrett authored May 11, 2021
2 parents a582209 + fd561de commit b6bdcc3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/@glimmer/runtime/lib/helpers/hash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { DEBUG } from '@glimmer/env';
import { CapturedArguments, CapturedNamedArguments, Dict } from '@glimmer/interfaces';
import { setCustomTagFor } from '@glimmer/manager';
import { createConstRef, Reference, valueForRef } from '@glimmer/reference';
Expand Down Expand Up @@ -44,14 +43,6 @@ class HashProxy implements ProxyHandler<Record<string, unknown>> {
}

getOwnPropertyDescriptor(target: {}, prop: string | number) {
if (DEBUG && !(prop in this.named)) {
throw new Error(
`args proxies do not have real property descriptors, so you should never need to call getOwnPropertyDescriptor yourself. This code exists for enumerability, such as in for-in loops and Object.keys(). Attempted to get the descriptor for \`${String(
prop
)}\``
);
}

if (prop in this.named) {
return {
enumerable: true,
Expand Down

0 comments on commit b6bdcc3

Please sign in to comment.