diff --git a/entityreference_prepopulate.module b/entityreference_prepopulate.module
index daaf31b..778d018 100644
--- a/entityreference_prepopulate.module
+++ b/entityreference_prepopulate.module
@@ -152,7 +152,7 @@ function entityreference_prepopulate_field_access($op, $field, $entity_type, $en
 
   if ($id && empty($entity->is_new)) {
     // The field need to be hidden when editing the entity.
-    return $settings['action'] == 'hide' && $settings['action_on_edit'] ? FALSE : NULL;
+    return $settings['action'] == 'hide' && !empty($settings['action_on_edit']) ? FALSE : NULL;
   }
 
   if ($settings['action'] == 'hide') {
