contentful 11.12.1 → 11.12.3
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/CONTRIBUTING.md +127 -40
- package/README.md +4 -0
- package/dist/contentful.browser.js +1806 -1395
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.cjs +1566 -946
- package/dist/esm/utils/validate-params.js +3 -1
- package/dist/stats-browser-min.html +1 -1
- package/package.json +1 -1
|
@@ -54,7 +54,9 @@ function checkEnableTimelinePreviewIsAllowed(host, timelinePreview) {
|
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
const isValidConfig = isValidTimelinePreviewConfig(timelinePreview);
|
|
57
|
-
|
|
57
|
+
// Show error if used outside of CPA.
|
|
58
|
+
// Opt-out of the error if a custom domain is used and CPA could not be idenfified
|
|
59
|
+
const isValidHost = typeof host === 'string' && (!host.includes('contentful') || host.startsWith('preview'));
|
|
58
60
|
if (isValidConfig && !isValidHost) {
|
|
59
61
|
throw new ValidationError('timelinePreview', `The 'timelinePreview' parameter can only be used with the CPA. Please set host to 'preview.contentful.com' or 'preview.eu.contentful.com' to enable Timeline Preview.
|
|
60
62
|
`);
|