@webqit/webflo 0.10.0 → 0.10.1

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": "0.10.0",
15
+ "version": "0.10.1",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -186,19 +186,21 @@ export default class Runtime {
186
186
  * @return Response
187
187
  */
188
188
  async go(url, init = {}, detail = {}) {
189
- if (this._abortController) {
190
- this._abortController.abort();
191
- }
192
- this._abortController = new AbortController();
193
- this._xRedirectCode = 200;
194
- // ------------
195
189
  url = typeof url === 'string' ? new whatwag.URL(url) : url;
196
190
  init = { referrer: this.location.href, ...init };
197
191
  // ------------
192
+ // Put his forward before instantiating a request and aborting previous
193
+ // Same-page hash-links clicks on chrome recurse here from histroy popstate
198
194
  if (detail.srcType !== 'init' && (_before(url.href, '#') === _before(init.referrer, '#') && (init.method || 'GET').toUpperCase() === 'GET')) {
199
195
  return;
200
196
  }
201
197
  // ------------
198
+ if (this._abortController) {
199
+ this._abortController.abort();
200
+ }
201
+ this._abortController = new AbortController();
202
+ this._xRedirectCode = 200;
203
+ // ------------
202
204
  if (['link', 'form'].includes(detail.srcType)) {
203
205
  Observer.set(detail.src, 'active', true);
204
206
  Observer.set(detail.submitter || {}, 'active', true);