From 3054621a60d33f5fd47ef9ed4ef31f8296b45131 Mon Sep 17 00:00:00 2001 From: Alexandre Passant Date: Thu, 12 Jun 2014 14:35:57 +0000 Subject: [PATCH] Fix for select fields with 'multiple' option and no selected values --- jquery.are-you-sure.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery.are-you-sure.js b/jquery.are-you-sure.js index aae155f..b75fe78 100644 --- a/jquery.are-you-sure.js +++ b/jquery.are-you-sure.js @@ -49,7 +49,9 @@ val = $field.is(':checked'); break; case 'select': - val = $field.val().toString(); + if($field.val()) { + val = $field.val().toString(); + } break; default: val = $field.val();