@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.js
CHANGED
|
@@ -18589,11 +18589,14 @@ ${this.shopifyCompatibility.getContentForHeader()}`;
|
|
|
18589
18589
|
* Get a list of sections and section groups in a page layout.
|
|
18590
18590
|
*/
|
|
18591
18591
|
async getPageSectionGroups(pageId, altTemplate) {
|
|
18592
|
-
|
|
18592
|
+
let pageConfig = this._getTemplateConfigByType(
|
|
18593
18593
|
"templates",
|
|
18594
18594
|
pageId,
|
|
18595
18595
|
altTemplate
|
|
18596
18596
|
);
|
|
18597
|
+
if (!pageConfig) {
|
|
18598
|
+
pageConfig = this._getTemplateConfigByType("templates", pageId);
|
|
18599
|
+
}
|
|
18597
18600
|
if (pageConfig === null) {
|
|
18598
18601
|
return [];
|
|
18599
18602
|
}
|
|
@@ -19598,6 +19601,11 @@ ${this.shopifyCompatibility.getContentForHeader()}`;
|
|
|
19598
19601
|
if (request.headers.get("swell-deployment-mode") === "editor") return false;
|
|
19599
19602
|
if (request.headers.get("cache-control")?.includes("no-cache"))
|
|
19600
19603
|
return false;
|
|
19604
|
+
const storefrontId = request.headers.get("swell-storefront-id");
|
|
19605
|
+
const themeVersionHash = request.headers.get("swell-theme-version-hash");
|
|
19606
|
+
if (!storefrontId || !themeVersionHash) {
|
|
19607
|
+
return false;
|
|
19608
|
+
}
|
|
19601
19609
|
return true;
|
|
19602
19610
|
}
|
|
19603
19611
|
isResponseCacheable(response, matchedRule) {
|