From daf255a838042ae71379728983b8d753c54b3502 Mon Sep 17 00:00:00 2001
From: Dan Chadwick <dan899@gmail.com>
Date: Mon, 22 Sep 2014 15:55:00 -0400
Subject: [PATCH] Issue #2342943 by DanChadwick: Fixed Duplicate drafts are
 created by auto-save when page cache is enabled.

---
 webform.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/webform.module b/webform.module
index b98cdb9..cc78572 100644
--- a/webform.module
+++ b/webform.module
@@ -2984,7 +2984,7 @@ function webform_client_form_postvalidate(&$form, &$form_state) {
       // Prevent the form from being cached, forcing it to be rebuilt from the
       // form definition function, which will honor the new sid.
       $form_state['no_cache'] = TRUE;
-      if (!variable_get('cache', 0) && !empty($form_state['values']['form_build_id'])) {
+      if (!empty($form_state['values']['form_build_id'])) {
         cache_clear_all('form_' . $form_state['values']['form_build_id'], 'cache_form');
         cache_clear_all('form_state_' . $form_state['values']['form_build_id'], 'cache_form');
       }
-- 
1.7.8.msysgit.0

