Skip to content

Commit

Permalink
apollo-server-core: use getOwnPropertyNames to stay es5
Browse files Browse the repository at this point in the history
  • Loading branch information
evans committed May 4, 2018
1 parent cf48115 commit b101384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/apollo-server-core/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] });
});

Expand Down

0 comments on commit b101384

Please sign in to comment.