File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,8 @@ export const setCurrentSandbox: AsyncAction<Sandbox> = async (
183183 state . editor . mainModuleShortid = main . shortid ;
184184
185185 // Only change the module shortid if it doesn't exist in the new sandbox
186- // What is the scenario here?
186+ // This can happen when a sandbox is opened that's different from the current
187+ // sandbox, with completely different files
187188 if (
188189 ! sandbox . modules . find ( module => module . shortid === currentModuleShortid )
189190 ) {
Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ export class ParcelTemplate extends Template {
3131 * The file to open by the editor
3232 */
3333 getDefaultOpenedFiles ( configFiles ) {
34- const entries = [ ] ;
34+ let entries = [ ] ;
3535
3636 entries . push ( '/index.js' ) ;
3737 entries . push ( '/src/index.js' ) ;
38- entries . concat ( this . getEntries ( configFiles ) ) ;
38+ entries . push ( '/index.ts' ) ;
39+ entries . push ( '/src/index.ts' ) ;
40+ entries = entries . concat ( this . getEntries ( configFiles ) ) ;
3941
4042 return entries ;
4143 }
You can’t perform that action at this time.
0 commit comments