Fix exception when doc install status is missing

pull/220/head
Thibaut 10 years ago
parent 4954dc688b
commit 12e0162a04

@ -134,4 +134,4 @@ class app.models.Doc extends app.Model
return return
isOutdated: (status) -> isOutdated: (status) ->
status.installed and @mtime isnt status.mtime status and status.installed and @mtime isnt status.mtime

@ -58,7 +58,7 @@ app.templates.offlineDoc = (doc, status) ->
<td class="_docs-size">#{Math.ceil(doc.db_size / 100000) / 10} MB</td> <td class="_docs-size">#{Math.ceil(doc.db_size / 100000) / 10} MB</td>
""" """
html += if !status.installed html += if !(status and status.installed)
""" """
<td>-</td> <td>-</td>
<td><a data-action="install">Install</a></td> <td><a data-action="install">Install</a></td>

Loading…
Cancel
Save