diff --git a/core/modules/quickedit/js/quickedit.js b/core/modules/quickedit/js/quickedit.js
index bf5ed42..3ba8ede 100644
--- a/core/modules/quickedit/js/quickedit.js
+++ b/core/modules/quickedit/js/quickedit.js
@@ -273,6 +273,9 @@
     // this case, we must find the entity in the mandatory "content" region.
     if (entityElement.length === 0) {
       entityElement = $('.region-content').find(entityElementSelector);
+      if (entityElement.length === 0) {
+        return;
+      }
     }
     var entityInstanceID = entityElement
       .get(0)
