@saasquatch/squatch-js 2.8.1-0 → 2.8.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/CHANGELOG.md +8 -1
- package/README.md +3 -11
- package/dist/squatch.cjs.js +8 -8
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +8 -8
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +8 -8
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/package.json +1 -1
package/dist/squatch.js
CHANGED
|
@@ -1800,11 +1800,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1800
1800
|
_log$3("No _saasquatchExtra param");
|
|
1801
1801
|
return;
|
|
1802
1802
|
}
|
|
1803
|
-
const config = validateConfig(
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
);
|
|
1803
|
+
const config = validateConfig({
|
|
1804
|
+
tenantAlias: "UNKNOWN"
|
|
1805
|
+
});
|
|
1806
|
+
if (!config.domain) {
|
|
1807
|
+
_log$3("domain must be provided in config to use _saasquatchExtra");
|
|
1808
1808
|
return;
|
|
1809
1809
|
}
|
|
1810
1810
|
let raw;
|
|
@@ -1818,7 +1818,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1818
1818
|
return domain.replace(/^https?:\/\//, "");
|
|
1819
1819
|
}
|
|
1820
1820
|
const normalizedDomain = normalizeDomain(config.domain);
|
|
1821
|
-
const
|
|
1821
|
+
const tenantAlias = Object.keys((raw == null ? void 0 : raw[normalizedDomain]) || {})[0];
|
|
1822
|
+
const widgetConfig = (_a2 = raw == null ? void 0 : raw[normalizedDomain]) == null ? void 0 : _a2[tenantAlias];
|
|
1822
1823
|
if (!widgetConfig) {
|
|
1823
1824
|
_log$3("_saasquatchExtra did not have an expected structure");
|
|
1824
1825
|
return void 0;
|
|
@@ -1832,8 +1833,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1832
1833
|
},
|
|
1833
1834
|
squatchConfig: {
|
|
1834
1835
|
...config,
|
|
1835
|
-
|
|
1836
|
-
tenantAlias: config.tenantAlias
|
|
1836
|
+
tenantAlias
|
|
1837
1837
|
}
|
|
1838
1838
|
};
|
|
1839
1839
|
}
|