Skip to content

Commit

Permalink
Update numeric NA check in Popular Movies demo
Browse files Browse the repository at this point in the history
  • Loading branch information
glin committed Dec 4, 2022
1 parent 26dcd53 commit 990316e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vignettes/popular-movies/popular-movies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function renderMovie(cellInfo) {
const genres = ' ' + cellInfo.row['genres'].join(', ')
let runtime = cellInfo.row['runtime']
if (typeof runtime === 'number') {
if (runtime != null) {
const hours = Math.floor(runtime / 60)
const mins = runtime % 60
runtime = [hours > 0 ? hours + 'h' : '', mins > 0 ? mins + 'm' : ''].join(' ')
Expand Down

0 comments on commit 990316e

Please sign in to comment.