Fix: Resolve build errors for Electron

- Add missing import for  in .
- Update regex in  to be compatible with older TS targets (before ES2018) by replacing  flag with .
This commit is contained in:
Johannes Millan 2025-11-28 20:04:26 +01:00
parent 8d30dae05e
commit f9c4629c49
2 changed files with 2 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import { App, ipcMain, Menu, nativeTheme, Tray } from 'electron';
import { IPC } from './shared-with-frontend/ipc-events.const';
import { getIsTrayShowCurrentTask, getIsTrayShowCurrentCountdown } from './shared-state';
import { TaskCopy } from '../src/app/features/tasks/task.model';
import { GlobalConfigState } from '../src/app/features/config/global-config.model';
import { release } from 'os';
import {
initOverlayIndicator,

View file

@ -128,7 +128,7 @@ export class HttpNotOkAPIError extends AdditionalLogErrorBase {
// Try to extract JSON error
try {
const jsonMatch = body.match(/\{.*\}/s);
const jsonMatch = body.match(/\{[\s\S]*\}/);
if (jsonMatch) {
const parsed = JSON.parse(jsonMatch[0]);
if (parsed.error) {