Compare commits

...

3 Commits

3 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
name: E2E Tests
on:
push:
branches: [ main ]
branches: [ main, pierremtb/im-dying ]
pull_request:
branches: [ main ]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -87,13 +87,12 @@ export const fileLoader: LoaderFunction = async (
)
const isBrowserProject = params.id === decodeURIComponent(BROWSER_PATH)
let code = ''
if (!isBrowserProject && projectPathData) {
const { projectName, projectPath, currentFileName, currentFilePath } =
projectPathData
const urlObj = new URL(routerData.request.url)
let code = ''
if (!urlObj.pathname.endsWith('/settings')) {
const fallbackFile = isDesktop()
@ -123,10 +122,6 @@ export const fileLoader: LoaderFunction = async (
})
code = normalizeLineEndings(code)
// If persistCode in localStorage is present, it'll persist that code
// through *anything*. INTENDED FOR TESTS.
code = codeManager.localStoragePersistCode() || code
// Update both the state and the editor's code.
// We explicitly do not write to the file here since we are loading from
// the file system and not the editor.
@ -154,6 +149,12 @@ export const fileLoader: LoaderFunction = async (
? await getProjectInfo(projectPath)
: null
console.log('maybeProjectInfo', {
maybeProjectInfo,
defaultProjectData,
projectPathData,
})
const projectData: IndexLoaderData = {
code,
project: maybeProjectInfo ?? defaultProjectData,
@ -170,7 +171,7 @@ export const fileLoader: LoaderFunction = async (
}
return {
code,
code: '',
project: {
name: BROWSER_PROJECT_NAME,
path: '/' + BROWSER_PROJECT_NAME,