+1
-1
package.json
+1
-1
package.json
+1
-1
utils/api.ts
+1
-1
utils/api.ts
···
12
12
// FIX: requires backend to return 401 when not logged in (currently returns 200 even if not logged in)
13
13
if (!response.ok) throw new Error(`HTTP ${response.status}`);
14
14
const html = await response.text();
15
-
const match = html.match(/>(\d+\+?)</);
15
+
const match = html.match(/>\s*(\d+\+?)\s*</);
16
16
return match ? parseInt(match[1], 10) : 0;
17
17
};
History
1 round
0 comments
moshyfawn.dev
submitted
#0
1 commit
expand
collapse
fix: tolerate whitespaces & newlines
expand 0 comments
pull request successfully merged