From e4567d04bf4fa72685e4cbf97ff4aa82b7108055 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 1 Nov 2021 16:05:13 -0700 Subject: [PATCH] Stop requesting bad outfit thumbnails in wardrobe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Oops, our cutesy feature to show an outfit thumbnail sa a placeholder while the rest of the data is loading was making spurious requests! I put the `skip` in the wrong place 😅 This caused a request to https://outfits.openneo-assets.net/outfits/null/v/NaN/300.png, which would return a 500. The user wouldn't see anything, because the image wouldn't show because it failed. But it's a mistake, and it's sending extra requests from the client and to the server, and it's a good one to fix! --- src/app/WardrobePage/WardrobePreviewAndControls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/WardrobePage/WardrobePreviewAndControls.js b/src/app/WardrobePage/WardrobePreviewAndControls.js index 4c17836..11ad564 100644 --- a/src/app/WardrobePage/WardrobePreviewAndControls.js +++ b/src/app/WardrobePage/WardrobePreviewAndControls.js @@ -72,8 +72,8 @@ function OutfitThumbnailIfCached({ outfitId }) { { variables: { outfitId, - skip: outfitId == null, }, + skip: outfitId == null, fetchPolicy: "cache-only", onError: (e) => console.error(e), }