Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: remove getBasenameFromFileUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Jun 24, 2024
1 parent 5ba09c2 commit f637f19
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/boot/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import * as Sentry from '@sentry/vue';
import { boot } from 'quasar/wrappers';
import { electronApi } from 'src/helpers/electron-api';
// import { electronApi } from 'src/helpers/electron-api';

import packageInfo from '../../package.json';

const { path } = electronApi;
// const { path } = electronApi;

function getBasenameFromFileUrl(fileUrl: string | undefined) {
if (!fileUrl) return '';
try {
const parsedUrl = new URL(fileUrl);
const pathname = decodeURIComponent(parsedUrl.pathname);
return path.join(path.basename(pathname));
} catch (e) {
console.error(e);
return '';
}
}
// function getBasenameFromFileUrl(fileUrl: string | undefined) {
// if (!fileUrl) return '';
// try {
// const parsedUrl = new URL(fileUrl);
// const pathname = decodeURIComponent(parsedUrl.pathname);
// return path.join(path.basename(pathname));
// } catch (e) {
// console.error(e);
// return '';
// }
// }

export default boot(({ app, router }) => {
Sentry.init({
Expand Down

0 comments on commit f637f19

Please sign in to comment.