lo-th / uil

simple javascript ui
http://lo-th.github.io/uil/
MIT License
556 stars 50 forks source link

Not able to set black as default color in color chooser component #1

Closed nidin closed 8 years ago

nidin commented 8 years ago

What? Not able to set black as default color in color chooser component. Why? when setting zero as default color following condition is false that result to white as default color.

this.value = '#ffffff';
if( o.value ){
    if(o.value instanceof Array) this.value = UIL.pack(o.value);
    else if(!isNaN(o.value)) this.value = UIL.numFormat(o.value);
    else this.value = o.value;
}
lo-th commented 8 years ago

yes you right is fixed if( o.value !== undefined ){...