···2 "name": "tug",
3 "description": "A tug for every notification",
4 "private": true,
5- "version": "0.1.1",
6 "type": "module",
7 "scripts": {
8 "dev": "wxt",
···2 "name": "tug",
3 "description": "A tug for every notification",
4 "private": true,
5+ "version": "0.1.2",
6 "type": "module",
7 "scripts": {
8 "dev": "wxt",
+1-1
utils/api.ts
···12 // FIX: requires backend to return 401 when not logged in (currently returns 200 even if not logged in)
13 if (!response.ok) throw new Error(`HTTP ${response.status}`);
14 const html = await response.text();
15- const match = html.match(/>(\d+\+?)</);
16 return match ? parseInt(match[1], 10) : 0;
17};
···12 // FIX: requires backend to return 401 when not logged in (currently returns 200 even if not logged in)
13 if (!response.ok) throw new Error(`HTTP ${response.status}`);
14 const html = await response.text();
15+ const match = html.match(/>\s*(\d+\+?)\s*</);
16 return match ? parseInt(match[1], 10) : 0;
17};