@webqit/webflo 1.0.15 → 1.0.16

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
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "1.0.15",
15
+ "version": "1.0.16",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -487,8 +487,8 @@ export class WebfloServer extends WebfloRuntime {
487
487
  scope.eventLifecyclePromises.dirty = true;
488
488
  promise.then(() => scope.eventLifecyclePromises.delete(promise));
489
489
  },
490
- respondWith: async (response) => {
491
- if (scope.eventLifecyclePromises.dirty && !scope.eventLifecyclePromises.size) {
490
+ respondWith: async (response, isRedirectMessage = false) => {
491
+ if (!isRedirectMessage && scope.eventLifecyclePromises.dirty && !scope.eventLifecyclePromises.size) {
492
492
  throw new Error('Final response already sent');
493
493
  }
494
494
  return await this.execPush(scope.clientMessaging, response);
@@ -546,7 +546,7 @@ export class WebfloServer extends WebfloRuntime {
546
546
  this.writeRedirectHeaders(scope.httpEvent, scope.response);
547
547
  } else {
548
548
  if (scope.redirectMessage) {
549
- scope.eventLifecycleHooks.respondWith(scope.redirectMessage);
549
+ scope.eventLifecycleHooks.respondWith(scope.redirectMessage, true);
550
550
  }
551
551
  this.writeAutoHeaders(scope.response.headers, scope.autoHeaders.filter((header) => header.type === 'response'));
552
552
  if (scope.httpEvent.request.method !== 'GET' && !scope.response.headers.get('Cache-Control')) {