From 5a2096fc26cd43e2f2d981aff124d5af7ed2af9d Mon Sep 17 00:00:00 2001 From: sbelzile Date: Wed, 15 Sep 2021 11:40:21 -0400 Subject: [PATCH] fix: reflect error --- src/utils/reflect.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/reflect.ts b/src/utils/reflect.ts index 2571c58..cbc8011 100644 --- a/src/utils/reflect.ts +++ b/src/utils/reflect.ts @@ -1,3 +1,4 @@ +// Copied from https://github.com/rbuckton/reflect-metadata/blob/master/Reflect.ts /*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use @@ -740,12 +741,12 @@ export namespace Reflect { // feature test for Symbol support const supportsSymbol = typeof Symbol === "function"; const toPrimitiveSymbol = - supportsSymbol && typeof Symbol.toPrimitive !== "undefined" - ? Symbol.toPrimitive + supportsSymbol && typeof (Symbol as any).toPrimitive !== "undefined" + ? (Symbol as any).toPrimitive : "@@toPrimitive"; const iteratorSymbol = - supportsSymbol && typeof Symbol.iterator !== "undefined" - ? Symbol.iterator + supportsSymbol && typeof (Symbol as any).iterator !== "undefined" + ? (Symbol as any).iterator : "@@iterator"; const supportsCreate = typeof Object.create === "function"; // feature test for Object.create support const supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support