Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurrell-r7 committed Sep 8, 2023
1 parent 1158c42 commit a422e19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ app.on('ready', async () => {
mainWindow.openDevTools({ mode: 'detach' });
} else {
baseUrl = path.normalize(path.join(__dirname, '/../../build/index.html'));
baseUrl = baseUrl.split(path.sep); // Split file path by OS path separator ('/' for POSIX, '/' or '\' for Windows)
baseUrl = baseUrl.join('/'); // Rejoin file path by acceptable separator, '/'
baseUrl = baseUrl.split(path.sep);
baseUrl = baseUrl.join('/');
baseUrl = `awsaml://${baseUrl}`;
Server.set('baseUrl', baseUrl);
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const {
} = require('node:fs');
const url = require('node:url');
const { refreshJit } = require('./containers/refresh-jit');

const isWindows = process.platform === 'win32';
const path = require('node:path');

function registerSchemas() {
protocol.registerSchemesAsPrivileged([{
Expand All @@ -19,6 +19,8 @@ function registerSchemas() {

function registerHandlers() {
protocol.handle('awsaml', (request) => {
let prefix;
let filePath;
if (isWindows) {
prefix = 'awsaml://C:';
filePath = `file://C:/${request.url.slice(prefix.length)}`;
Expand Down

0 comments on commit a422e19

Please sign in to comment.