File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,14 @@ export class BoardGameGeekAPI extends APIModel {
4141 for ( const boardgame of Array . from ( response . querySelectorAll ( "boardgame" ) ) ) {
4242 const id = boardgame . attributes . getNamedItem ( "objectid" ) . value ;
4343 const title = boardgame . querySelector ( "name" ) . textContent ;
44- const year = boardgame . querySelector ( "yearpublished" ) . textContent ;
44+ const year = boardgame . querySelector ( "yearpublished" ) ? .textContent ?? "" ;
4545
4646 ret . push ( new BoardGameModel ( {
4747 dataSource : this . apiName ,
4848 id,
4949 title,
5050 englishTitle : title ,
51- year,
51+ year,
5252 } as BoardGameModel ) ) ;
5353 }
5454
@@ -82,7 +82,7 @@ export class BoardGameGeekAPI extends APIModel {
8282 type : MediaType . BoardGame ,
8383 title,
8484 englishTitle : title ,
85- year,
85+ year : year === "0" ? "" : year ,
8686 dataSource : this . apiName ,
8787 url : `https://boardgamegeek.com/boardgame/${ id } ` ,
8888 id,
You can’t perform that action at this time.
0 commit comments