@contentful/experiences-visual-editor-react 3.1.1-dev-20250811T1043-028392b.0 → 3.1.1-dev-20250811T1516-ddc6cd6.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
@@ -4398,8 +4398,13 @@ function useEditorSubscriber(inMemoryEntitiesStore) {
4398
4398
  case INCOMING_EVENTS.RequestEditorMode: {
4399
4399
  break;
4400
4400
  }
4401
- default:
4402
- console.error(`[experiences-sdk-react::onMessage] Logic error, unsupported eventType: [${eventData.eventType}]`);
4401
+ default: {
4402
+ const knownEvents = Object.values(INCOMING_EVENTS);
4403
+ const isDeprecatedMessage = knownEvents.includes(eventData.eventType);
4404
+ if (!isDeprecatedMessage) {
4405
+ console.error(`[experiences-sdk-react::onMessage] Logic error, unsupported eventType: [${eventData.eventType}]`);
4406
+ }
4407
+ }
4403
4408
  }
4404
4409
  };
4405
4410
  window.addEventListener('message', onMessage);