Cannot get property 'imdbId' on null object
This commit is contained in:
parent
38ef460f1b
commit
0a9b139256
|
@ -13,7 +13,7 @@ def updateMovieIndex = { m ->
|
||||||
if (!recentMoviesIndex.containsKey(m.tmdbId)) {
|
if (!recentMoviesIndex.containsKey(m.tmdbId)) {
|
||||||
def i = TheMovieDB.getMovieInfo(m, Locale.ENGLISH, false)
|
def i = TheMovieDB.getMovieInfo(m, Locale.ENGLISH, false)
|
||||||
|
|
||||||
if (i.imdbId == null)
|
if (i == null || i.imdbId == null)
|
||||||
return
|
return
|
||||||
|
|
||||||
def row = [i.id.pad(6), i.imdbId.pad(7), i.released.year as String, i.name]
|
def row = [i.id.pad(6), i.imdbId.pad(7), i.released.year as String, i.name]
|
||||||
|
|
Loading…
Reference in New Issue