mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
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:
parent
8d30dae05e
commit
f9c4629c49
2 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue