Skip to content

Commit

Permalink
Allow default value to be falsy.
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyHairy committed Jan 31, 2017
1 parent be6c285 commit e13f60b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/ListPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ListPicker.prototype.showPicker = function(options, callback, error_callback) {

var config = {
title: options.title || ' ',
selectedValue: options.selectedValue || '',
selectedValue: typeof(options.selectedValue) !== 'undefined' ? options.selectedValue : '',
items: options.items || {},
style: options.style || 'default',
doneButtonLabel: options.doneButtonLabel || 'Done',
Expand All @@ -35,4 +35,4 @@ ListPicker.prototype.showPicker = function(options, callback, error_callback) {
};
cordova.exec(_callback, _error_callback, 'ListPicker', 'showPicker', [config]);
}
module.exports = new ListPicker();
module.exports = new ListPicker();

0 comments on commit e13f60b

Please sign in to comment.