Fix wish cache attempting to generate multiple times
This commit is contained in:
parent
829eb47f2e
commit
3710dbcf52
1 changed files with 2 additions and 3 deletions
|
@ -142,14 +142,13 @@ $(function () {
|
|||
var wishlistIndex = $('.ui.dropdown.wishlists select').prop('selectedIndex') - 1;
|
||||
var wishlist_user = wishlists[wishlistIndex].user;
|
||||
|
||||
card.attr('data-cache', 'false');
|
||||
|
||||
fetch('/src/api/wishes.php?wish_id=' + card.attr('data-id') + '&wishlist_user=' + wishlist_user, {
|
||||
method: 'GET'
|
||||
})
|
||||
.then(handleFetchError)
|
||||
.then(handleFetchResponse)
|
||||
.then(function(response) {
|
||||
card.replaceWith(response.html.replace('data-cache="true"', 'data-cache="false"'));
|
||||
})
|
||||
.catch(handleFetchCatch)
|
||||
.finally(function() {
|
||||
card.removeClass('loading');
|
||||
|
|
Loading…
Reference in a new issue