@portabletext/editor 1.48.11 → 1.48.12
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.
|
@@ -7406,10 +7406,15 @@ function performEvent({
|
|
|
7406
7406
|
let nativeEventPrevented = !1, defaultBehaviorOverwritten = !1, eventBehaviorIndex = -1;
|
|
7407
7407
|
for (const eventBehavior of eventBehaviors) {
|
|
7408
7408
|
eventBehaviorIndex++;
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7409
|
+
let shouldRun = !1;
|
|
7410
|
+
try {
|
|
7411
|
+
shouldRun = eventBehavior.guard === void 0 || eventBehavior.guard({
|
|
7412
|
+
snapshot: guardSnapshot,
|
|
7413
|
+
event
|
|
7414
|
+
});
|
|
7415
|
+
} catch (error) {
|
|
7416
|
+
console.error(new Error(`Evaluating guard for "${event.type}" failed due to: ${error.message}`));
|
|
7417
|
+
}
|
|
7413
7418
|
if (shouldRun) {
|
|
7414
7419
|
defaultBehaviorOverwritten = !0;
|
|
7415
7420
|
for (const actionSet of eventBehavior.actions) {
|