Ticket #1288 (closed defect: fixed)

Opened 2 years ago

Last modified 15 months ago

SortableTable parseData 0 converted to empty string

Reported by: hairiemx@… Owned by: ttrenka
Priority: normal Milestone:
Component: Widgets Version: 0.3
Severity: normal Keywords:
Cc:

Description

This part cause the problem. If JSON data contains numeric value 0, instead of displaying 0, it will display empty string.

0 is equivalent to false. So, it will go to the else statement.

if(val){

o[field]=new type(val);

}else{

o[field]=new type(); // let it use the default.

}

Change History

Changed 2 years ago by dylan

  • owner changed from anonymous to ttrenka
  • component changed from General to Widgets
  • milestone set to 0.5

Changed 2 years ago by ttrenka

  • milestone changed from 0.5 to 0.4

Changing milestone, this is a quick fix.

Changed 2 years ago by ttrenka

  • status changed from new to closed
  • resolution set to fixed

(In [5407]) Fixes #1288.

Changed 15 months ago by anonymous

  • milestone deleted

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.