@contentful/experiences-visual-editor-react 1.40.1-dev-20250605T1509-fb1d2c5.0 → 1.40.2-dev-20250606T1202-905bb9e.0

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.js CHANGED
@@ -1096,10 +1096,11 @@ const CF_DEBUG_KEY$1 = 'cf_debug';
1096
1096
  * SecurityError (e.g. Brave or Chromium with specific settings).
1097
1097
  */
1098
1098
  const checkLocalStorageAvailability$1 = () => {
1099
- if (typeof localStorage === 'undefined' || localStorage === null) {
1100
- return false;
1101
- }
1102
1099
  try {
1100
+ // Even the typeof check can throw an error in an agressive browser like Brave (requires using the deprecated flag #block-all-cookies-toggle)
1101
+ if (typeof localStorage === 'undefined' || localStorage === null) {
1102
+ return false;
1103
+ }
1103
1104
  // Attempt to set and remove an item to check if localStorage is enabled
1104
1105
  const TEST_KEY = 'cf_test_local_storage';
1105
1106
  localStorage.setItem(TEST_KEY, 'yes');
@@ -3824,10 +3825,11 @@ const CF_DEBUG_KEY = 'cf_debug';
3824
3825
  * SecurityError (e.g. Brave or Chromium with specific settings).
3825
3826
  */
3826
3827
  const checkLocalStorageAvailability = () => {
3827
- if (typeof localStorage === 'undefined' || localStorage === null) {
3828
- return false;
3829
- }
3830
3828
  try {
3829
+ // Even the typeof check can throw an error in an agressive browser like Brave (requires using the deprecated flag #block-all-cookies-toggle)
3830
+ if (typeof localStorage === 'undefined' || localStorage === null) {
3831
+ return false;
3832
+ }
3831
3833
  // Attempt to set and remove an item to check if localStorage is enabled
3832
3834
  const TEST_KEY = 'cf_test_local_storage';
3833
3835
  localStorage.setItem(TEST_KEY, 'yes');