@swell/apps-sdk 1.0.173 → 1.0.174
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/dist/index.cjs +9 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +9 -1
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18711,11 +18711,14 @@ ${this.shopifyCompatibility.getContentForHeader()}`;
|
|
|
18711
18711
|
* Get a list of sections and section groups in a page layout.
|
|
18712
18712
|
*/
|
|
18713
18713
|
async getPageSectionGroups(pageId, altTemplate) {
|
|
18714
|
-
|
|
18714
|
+
let pageConfig = this._getTemplateConfigByType(
|
|
18715
18715
|
"templates",
|
|
18716
18716
|
pageId,
|
|
18717
18717
|
altTemplate
|
|
18718
18718
|
);
|
|
18719
|
+
if (!pageConfig) {
|
|
18720
|
+
pageConfig = this._getTemplateConfigByType("templates", pageId);
|
|
18721
|
+
}
|
|
18719
18722
|
if (pageConfig === null) {
|
|
18720
18723
|
return [];
|
|
18721
18724
|
}
|
|
@@ -19720,6 +19723,11 @@ var HtmlCache = class {
|
|
|
19720
19723
|
if (request.headers.get("swell-deployment-mode") === "editor") return false;
|
|
19721
19724
|
if (request.headers.get("cache-control")?.includes("no-cache"))
|
|
19722
19725
|
return false;
|
|
19726
|
+
const storefrontId = request.headers.get("swell-storefront-id");
|
|
19727
|
+
const themeVersionHash = request.headers.get("swell-theme-version-hash");
|
|
19728
|
+
if (!storefrontId || !themeVersionHash) {
|
|
19729
|
+
return false;
|
|
19730
|
+
}
|
|
19723
19731
|
return true;
|
|
19724
19732
|
}
|
|
19725
19733
|
isResponseCacheable(response, matchedRule) {
|