@@ -255,23 +255,23 @@ const runWindowPlugins = async (win: BrowserWindow | null = null, type = 'load',
255255 // ------------------------ Window Page Load Behavior ------------------------
256256 const loadPage = async ( win , page ) => {
257257
258- const location = getPageLocation ( page )
259-
260258 try {
259+ const location = isDevServer ? new URL ( page , devServerURL ) . href : page
261260 new URL ( location )
262261 win . loadURL ( location )
262+ return location
263263 }
264264
265265 // NOTE: Catching the alternative location results in a delay depending on load time
266266 catch {
267+ const location = getPageLocation ( page )
268+
267269 return await win . loadFile ( location ) . catch ( ( ) => {
268270 const location = getPageLocation ( page , true )
269271 win . loadFile ( location )
270272 return location
271273 } )
272274 }
273-
274- return location
275275 }
276276
277277 const isValidUrl = ( url ) => {
@@ -437,8 +437,6 @@ const runWindowPlugins = async (win: BrowserWindow | null = null, type = 'load',
437437
438438function getPageLocation ( pathname : string = 'index.html' , alt = false ) {
439439
440- if ( isDevServer ) return new URL ( pathname , devServerURL ) . href
441-
442440 pathname = pathname . startsWith ( '/' ) && isWindows ? pathname . slice ( 1 ) : pathname // Remove leading slash on Windows
443441
444442 const isContained = normalizeAndCompare ( pathname , __dirname , ( a , b ) => a . startsWith ( b ) )
@@ -516,8 +514,6 @@ services.resolveAll(config.services, baseServiceOptions).then(async (resolvedSer
516514 const { host, pathname, search, hash } = loadedURL
517515 const updatedPathname = pathname . endsWith ( '/' ) ? pathname . slice ( 0 , - 1 ) : pathname
518516
519- console . log ( updatedPathname , host , search , hash )
520-
521517 // Proxy the services through the custom protocol
522518 if ( host === "services" ) {
523519 const splitPath = updatedPathname . split ( '/' )
0 commit comments