diff --git a/src/Element/Captcha.php b/src/Element/Captcha.php
index fb4b06c..d099ef4 100644
--- a/src/Element/Captcha.php
+++ b/src/Element/Captcha.php
@@ -87,7 +87,7 @@ class Captcha extends FormElement implements ContainerFactoryPluginInterface {
     // Add JavaScript for general CAPTCHA functionality.
     $element['#attached']['library'][] = 'captcha/base';
 
-    if ($form_state->getTriggeringElement() && is_array($form_state->getTriggeringElement()['#limit_validation_errors'])) {
+    if ($form_state->getTriggeringElement() && isset($form_state->getTriggeringElement()['#limit_validation_errors']) && is_array($form_state->getTriggeringElement()['#limit_validation_errors'])) {
       // This is a partial (ajax) submission with limited validation. Do not
       // change anything about the captcha element, assume that it will not
       // update the captcha element, do not generate anything, which keeps the
