From 6a03014ab62b4b80d6df1c015a8439ea70f1e4b2 Mon Sep 17 00:00:00 2001 From: David Adam Justice Date: Tue, 12 Aug 2014 12:34:43 -0700 Subject: [PATCH] fix undefined volume setting --- javascripts/jquery-vimvol.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascripts/jquery-vimvol.js b/javascripts/jquery-vimvol.js index 6963b59..30086fc 100644 --- a/javascripts/jquery-vimvol.js +++ b/javascripts/jquery-vimvol.js @@ -16,7 +16,7 @@ var $this = $(this), $body = $('body'), steps = $this.attr('max') || settings.steps, - value = settings.volume.toString() || $this.attr('value') / steps || settings.value / steps, + value = settings.volume ? settings.volume.toString() : $this.attr('value') / steps || settings.value / steps, $el = $('').appendTo($this.parent()).addClass(settings.class); $this = $this.detach().appendTo($el); @@ -102,4 +102,4 @@ }); } -}(jQuery, window, document)); \ No newline at end of file +}(jQuery, window, document));