From 0f8d7046acd98779caec80a8bbcef87aa0d4d211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 22 Apr 2026 09:19:31 +0400 Subject: [PATCH] Improve blurhash decode warning, use valid hashes in tests --- app/components/blurhash.gjs | 2 +- .../integration/components/place-photos-carousel-test.gjs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/components/blurhash.gjs b/app/components/blurhash.gjs index 0dee902..bb9dd7d 100644 --- a/app/components/blurhash.gjs +++ b/app/components/blurhash.gjs @@ -23,7 +23,7 @@ export default class Blurhash extends Component { imageData.data.set(pixels); ctx.putImageData(imageData, 0, 0); } catch (e) { - console.warn('Failed to decode blurhash:', e); + console.warn('Failed to decode blurhash:', e.message || e); } }); diff --git a/tests/integration/components/place-photos-carousel-test.gjs b/tests/integration/components/place-photos-carousel-test.gjs index 72fc3cc..2c8f5c5 100644 --- a/tests/integration/components/place-photos-carousel-test.gjs +++ b/tests/integration/components/place-photos-carousel-test.gjs @@ -23,7 +23,7 @@ module('Integration | Component | place-photos-carousel', function (hooks) { { url: 'photo1.jpg', thumbUrl: 'thumb1.jpg', - blurhash: 'L0000', + blurhash: 'LKO2?U%2Tw=w]~RBVZRi};RPxuwH', ratio: 1.5, isLandscape: true, }, @@ -56,21 +56,21 @@ module('Integration | Component | place-photos-carousel', function (hooks) { { url: 'photo1.jpg', thumbUrl: 'thumb1.jpg', - blurhash: 'L0000', + blurhash: 'LKO2?U%2Tw=w]~RBVZRi};RPxuwH', ratio: 1.5, isLandscape: true, }, { url: 'photo2.jpg', thumbUrl: 'thumb2.jpg', - blurhash: 'L1111', + blurhash: 'LKO2?U%2Tw=w]~RBVZRi};RPxuwH', ratio: 1.0, isLandscape: false, }, { url: 'photo3.jpg', thumbUrl: 'thumb3.jpg', - blurhash: 'L2222', + blurhash: 'LKO2?U%2Tw=w]~RBVZRi};RPxuwH', ratio: 0.8, isLandscape: false, },