aboutsummaryrefslogtreecommitdiffstats
path: root/options.html
diff options
context:
space:
mode:
authorPhil Crosby2010-01-21 22:33:08 -0800
committerPhil Crosby2010-01-21 22:33:08 -0800
commit7ef4c24b20976560f0ed9aa981b197b1121f79a9 (patch)
treead6c90d294278ef83abf54355d6bcabbc55c5a07 /options.html
parentae687d72e2c6b0417d055fdd86f434b0944deedc (diff)
downloadvimium-7ef4c24b20976560f0ed9aa981b197b1121f79a9.tar.bz2
Fix a bug in the options page which would prevent excluded URLs from being saved
Diffstat (limited to 'options.html')
-rw-r--r--options.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/options.html b/options.html
index 6f719f80..3ddeb38d 100644
--- a/options.html
+++ b/options.html
@@ -80,7 +80,9 @@
for (var i = 0; i < editableFields.length; i++) {
var fieldName = editableFields[i];
var fieldValue = $(fieldName).value.trim();
- if (fieldValue == defaultSettings[fieldName].toString())
+ var defaultFieldValue = (defaultSettings[fieldName] != null) ?
+ defaultSettings[fieldName].toString() : "";
+ if (fieldValue == defaultFieldValue)
delete localStorage[fieldName];
else
localStorage[fieldName] = fieldValue;