From 1f11baed16676cf0def6447adb1ce27dd6e849f4 Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Thu, 2 May 2024 03:59:05 +0800 Subject: [PATCH] fix parsing quotable --- app/mod/add-widget-quotable/mod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mod/add-widget-quotable/mod.js b/app/mod/add-widget-quotable/mod.js index 2a24a1c..a1adf9c 100644 --- a/app/mod/add-widget-quotable/mod.js +++ b/app/mod/add-widget-quotable/mod.js @@ -41,7 +41,7 @@ } else { const response = await fetch('https://api.quotable.io/quotes/random'); const data = await response.json(); - return data.content; + return data[0].content; } } catch (error) { console.error('Failed to get Quotable', error);