Skip to content

Commit af0054f

Browse files
committed
Ui-model fixes.
1 parent 260b931 commit af0054f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

ui-models/comics.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ uiModels.comics = {
99
fnTitle: 'title',
1010
fnSearch: ['title', 'authors', 'notes'],
1111
fnBadge: function(m){
12-
var hNb=m.get('haveNb'),
13-
sNb=m.get('serieNb');
14-
return (hNb==sNb)?hNb:hNb+'/'+sNb;
12+
if(m){
13+
var hNb=m.get('have_nb'),
14+
sNb=m.get('serie_nb');
15+
return (hNb==sNb)?hNb:hNb+'/'+sNb;
16+
}
17+
return '';
1518
},
1619
elements: [
1720
{
@@ -52,11 +55,11 @@ uiModels.comics = {
5255
]
5356
},
5457
{
55-
id: 'serieNb', attribute: 'serie_nb', type: 'integer', width: 15, inMany: false,
58+
id: 'serie_nb', attribute: 'serie_nb', type: 'integer', width: 15, inMany: false,
5659
label: 'Albums', inCharts:false
5760
},
5861
{
59-
id: 'haveNb', attribute: 'have_nb', type: 'integer', width: 15, inMany: false,
62+
id: 'have_nb', attribute: 'have_nb', type: 'integer', width: 15, inMany: false,
6063
label: 'Owned', inCharts:false
6164
},
6265
{

0 commit comments

Comments
 (0)