solidstep 0.1.3 → 0.1.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solidstep",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Next Step SolidJS Framework for building web applications.",
5
5
  "type": "module",
6
6
  "author": "HamzaKV <hamzakv333@gmail.com>",
package/server.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAygBA,QAAA,MAAM,OAAO,+FA+TX,CAAC;AAEH,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAygBA,QAAA,MAAM,OAAO,+FAqUX,CAAC;AAEH,eAAe,OAAO,CAAC"}
package/server.js CHANGED
@@ -577,7 +577,8 @@ const handler = eventHandler(async (event) => {
577
577
  }
578
578
  }
579
579
  catch (e1) {
580
- if (e1 instanceof RedirectError) {
580
+ if (e1 instanceof RedirectError ||
581
+ e1.name === 'RedirectError') {
581
582
  throw e1;
582
583
  }
583
584
  try {
@@ -662,7 +663,8 @@ const handler = eventHandler(async (event) => {
662
663
  return res.end(transformHtml);
663
664
  }
664
665
  catch (e) {
665
- if (e instanceof RedirectError) {
666
+ if (e instanceof RedirectError ||
667
+ e.name === 'RedirectError') {
666
668
  res.statusCode = 302;
667
669
  res.setHeader('Location', e.message);
668
670
  return res.end('Redirecting...');