Fix cache for wishes without an url

This commit is contained in:
grandeljay 2022-02-27 01:07:50 +01:00
parent 965fbf3af6
commit 2a33f2c320
2 changed files with 5 additions and 1 deletions

View file

@ -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);

View file

@ -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;
?>