seroval 0.11.4 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1407,6 +1407,9 @@ async function parseObject(ctx, current) {
1407
1407
  current
1408
1408
  );
1409
1409
  }
1410
+ if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
1411
+ return generatePromiseNode(ctx, id, current);
1412
+ }
1410
1413
  if (ctx.features & 8192 /* WebAPI */) {
1411
1414
  switch (currentClass) {
1412
1415
  case URL:
@@ -1438,9 +1441,6 @@ async function parseObject(ctx, current) {
1438
1441
  if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
1439
1442
  return generateAggregateErrorNode(ctx, id, current);
1440
1443
  }
1441
- if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
1442
- return generatePromiseNode(ctx, id, current);
1443
- }
1444
1444
  if (current instanceof Error) {
1445
1445
  return generateErrorNode(ctx, id, current);
1446
1446
  }
@@ -3685,6 +3685,9 @@ async function parseObject3(ctx, current) {
3685
3685
  current
3686
3686
  );
3687
3687
  }
3688
+ if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
3689
+ return generatePromiseNode2(ctx, id, current);
3690
+ }
3688
3691
  if (ctx.features & 8192 /* WebAPI */) {
3689
3692
  switch (currentClass) {
3690
3693
  case URL:
@@ -3716,9 +3719,6 @@ async function parseObject3(ctx, current) {
3716
3719
  if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
3717
3720
  return generateAggregateErrorNode3(ctx, id, current);
3718
3721
  }
3719
- if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
3720
- return generatePromiseNode2(ctx, id, current);
3721
- }
3722
3722
  if (current instanceof Error) {
3723
3723
  return generateErrorNode3(ctx, id, current);
3724
3724
  }
@@ -4923,6 +4923,9 @@ function parseObject4(ctx, current) {
4923
4923
  if (ctx.features & 512 /* Set */ && currentClass === Set) {
4924
4924
  return generateSetNode4(ctx, id, current);
4925
4925
  }
4926
+ if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
4927
+ return generatePromiseNode3(ctx, id, current);
4928
+ }
4926
4929
  if (ctx.features & 8192 /* WebAPI */) {
4927
4930
  switch (currentClass) {
4928
4931
  case URL:
@@ -4952,9 +4955,6 @@ function parseObject4(ctx, current) {
4952
4955
  if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
4953
4956
  return generateAggregateErrorNode4(ctx, id, current);
4954
4957
  }
4955
- if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
4956
- return generatePromiseNode3(ctx, id, current);
4957
- }
4958
4958
  if (current instanceof Error) {
4959
4959
  return generateErrorNode4(ctx, id, current);
4960
4960
  }