rytm-webflow 2.1.4 → 2.1.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.
package/package.json
CHANGED
package/scripts/aswap/ASwap.js
CHANGED
|
@@ -22,6 +22,7 @@ class ASwap {
|
|
|
22
22
|
oldschoolBrowserFallback: true, // IE11 or lower is not supported
|
|
23
23
|
preloadOnHover: false, // preload links on hover
|
|
24
24
|
refreshOnSameUrl: true, // refresh window if same URL is requested
|
|
25
|
+
refreshOnContentParseError: true, // refresh window if loaded request has special characters
|
|
25
26
|
routes: {},
|
|
26
27
|
swapSelector: '#stage', // swap wrapper selector
|
|
27
28
|
defaultDocumentScrollBehavior: 'smooth',
|
|
@@ -70,7 +70,7 @@ class ASwapDispatcher extends EventDispatcher {
|
|
|
70
70
|
if (body && body[index]) {
|
|
71
71
|
return body[index];
|
|
72
72
|
} else {
|
|
73
|
-
this.warning("AS problem - " + tag + " could not be extracted, index:",
|
|
73
|
+
this.warning("AS problem - " + tag + " could not be extracted, index:", index);
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -142,6 +142,9 @@ class ASwapDispatcher extends EventDispatcher {
|
|
|
142
142
|
let body = this.getTagFromResult(result, "body");
|
|
143
143
|
if (!body) {
|
|
144
144
|
this.warning("AS problem - body was not found in result");
|
|
145
|
+
if (this.refreshOnContentParseError) {
|
|
146
|
+
window.location.reload();
|
|
147
|
+
}
|
|
145
148
|
return false;
|
|
146
149
|
}
|
|
147
150
|
let html = document.createElement('html');
|