File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1111 - uses : actions/checkout@v1
1212
1313 - name : Cache node modules
14- uses : actions/cache@v1
14+ uses : actions/cache@v4
1515 with :
1616 path : ~/.npm
1717 key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Original file line number Diff line number Diff line change @@ -240,16 +240,23 @@ export class MetaService {
240240 if ( result && result . sectionHeaders ) {
241241 this . sectionHeaders = result . sectionHeaders ;
242242 }
243- result . fields = keepFieldsFromLayout ? result . fields : this . fields ;
244243 result . layouts = this . layouts ;
245244 result . trackTrigger = this . trackTrigger ;
246245 result . tracks = this . tracks ;
247246 result . sectionHeaders = this . sectionHeaders ;
248247
249248 result . allFieldsLoaded = result . allFieldsLoaded || this . allFieldsLoaded ;
250249 this . allFieldsLoaded = result . allFieldsLoaded ;
251- // tslint:disable-next-line:no-floating-promises
252- Cache . put ( this . endpoint , result ) ;
250+ if ( keepFieldsFromLayout ) {
251+ // Save cache as separate object
252+ const cacheResult = { ...result , fields : this . fields } ;
253+ // tslint:disable-next-line:no-floating-promises
254+ Cache . put ( this . endpoint , cacheResult ) ;
255+ } else {
256+ result . fields = this . fields ;
257+ // tslint:disable-next-line:no-floating-promises
258+ Cache . put ( this . endpoint , result ) ;
259+ }
253260 }
254261
255262 private missing ( fields ) : string [ ] {
You can’t perform that action at this time.
0 commit comments