mirror of
https://github.com/vale981/apollo-server
synced 2025-03-05 17:51:40 -05:00
apollo-server-core: use getOwnPropertyNames to stay es5
This commit is contained in:
parent
26c09e1b1b
commit
1f3103b5c7
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ export function fromGraphQLError(error: GraphQLError, options?: ErrorOptions) {
|
|||
//copy the original error, while keeping all values non-enumerable, so they
|
||||
//are not printed unless directly referenced
|
||||
Object.defineProperty(copy, 'originalError', { value: {} });
|
||||
Reflect.ownKeys(error).forEach(key => {
|
||||
Object.getOwnPropertyNames(error).forEach(key => {
|
||||
Object.defineProperty(copy.originalError, key, { value: error[key] });
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue