Skip to content

Commit 410cd17

Browse files
Merge pull request #36 from thebigredgeek/revert-32-patch-1
Revert "Set error config properly."
2 parents 0869ab8 + bf393c0 commit 410cd17

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ export class ApolloError extends ExtendableError {
3434
_showPath: boolean = false;
3535

3636
constructor(name: string, config: ErrorConfig) {
37-
super((arguments[1] && arguments[1].message) || '');
37+
super((arguments[2] && arguments[2].message) || '');
3838

39-
const t = (arguments[1] && arguments[1].time_thrown) || (new Date()).toISOString();
40-
const m = (arguments[1] && arguments[1].message) || '';
41-
const configData = (arguments[1] && arguments[1].data) || {};
39+
const t = (arguments[2] && arguments[2].time_thrown) || (new Date()).toISOString();
40+
const m = (arguments[2] && arguments[2].message) || '';
41+
const configData = (arguments[2] && arguments[2].data) || {};
4242
const d = { ...this.data, ...configData };
43-
const opts = ((arguments[1] && arguments[1].options) || {});
43+
const opts = ((arguments[2] && arguments[2].options) || {});
4444

4545

4646
this.name = name;

0 commit comments

Comments
 (0)