Fix cache for wishes without an url
This commit is contained in:
parent
965fbf3af6
commit
2a33f2c320
2 changed files with 5 additions and 1 deletions
|
@ -123,6 +123,10 @@ $(function () {
|
|||
var wish_id = card.data('id');
|
||||
var refresh = card.find('button.refresh');
|
||||
|
||||
if (!href) {
|
||||
return;
|
||||
}
|
||||
|
||||
card.addClass('loading');
|
||||
card.attr('data-cache', true);
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ class Wishlist
|
|||
<?php foreach ($wishes as $wish) {
|
||||
$cache = new EmbedCache($wish['url']);
|
||||
$info = $cache->get(false);
|
||||
$exists = $cache->exists() ? 'true' : 'false';
|
||||
$exists = $cache->exists() || !$info->url ? 'true' : 'false';
|
||||
|
||||
$title = $wish['title'] ?? $info->title;
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue