From f5717fd7cc584c52f00260245f404814a0a8a509 Mon Sep 17 00:00:00 2001 From: Chris Garrett Date: Tue, 27 Apr 2021 13:57:16 -0700 Subject: [PATCH] Remove unnecessary property descriptor assertion from hash Removes an unnecessary property descriptor assertion, hash should work like a normal object (unlike args proxies) and so it should be allowed to read the property descriptors on it. --- packages/@glimmer/runtime/lib/helpers/hash.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/@glimmer/runtime/lib/helpers/hash.ts b/packages/@glimmer/runtime/lib/helpers/hash.ts index 6608d9612d..ecfcb68abe 100644 --- a/packages/@glimmer/runtime/lib/helpers/hash.ts +++ b/packages/@glimmer/runtime/lib/helpers/hash.ts @@ -44,14 +44,6 @@ class HashProxy implements ProxyHandler> { } 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,