File tree 2 files changed +6
-0
lines changed
scopes/harmony/ipc-events 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ export class IpcEventsMain {
79
79
} ) ;
80
80
ipcEventsMain . registerGotEventSlot ( async ( eventName ) => {
81
81
if ( eventName === 'onPostObjectsPersist' ) {
82
+ logger . debug ( 'got an event onPostObjectsPersist, clearing the cache and reloading staged-snaps' ) ;
82
83
scope . legacyScope . objects . clearObjectsFromCache ( ) ;
84
+ scope . legacyScope . setStagedSnaps ( ) ; // "bit export" deletes the staged-snaps file, so it should be reloaded
83
85
}
84
86
} ) ;
85
87
}
Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ export default class Scope {
143
143
this . lanes = new Lanes ( this . objects , this . scopeJson ) ;
144
144
this . isBare = scopeProps . isBare ?? false ;
145
145
this . scopeImporter = ScopeComponentsImporter . getInstance ( this ) ;
146
+ this . setStagedSnaps ( ) ;
147
+ }
148
+
149
+ setStagedSnaps ( ) {
146
150
this . stagedSnaps = StagedSnaps . load ( this . path ) ;
147
151
}
148
152
You can’t perform that action at this time.
0 commit comments