File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/project/lib/specifications Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ class Project extends Specification {
462462
463463class Stage {
464464 #id;
465- #writerVersions = [ ] ;
465+ #writerVersions = [ ] ; // First element is the latest writer
466466 #cacheReader;
467467
468468 constructor ( id , cacheReader ) {
@@ -475,16 +475,16 @@ class Stage {
475475 }
476476
477477 newVersion ( writer ) {
478- this . #writerVersions. push ( writer ) ;
478+ this . #writerVersions. unshift ( writer ) ;
479479 }
480480
481481 getWriter ( ) {
482- return this . #writerVersions[ this . #writerVersions . length - 1 ] ;
482+ return this . #writerVersions[ 0 ] ;
483483 }
484484
485485 getAllWriters ( includeCache = true ) {
486486 if ( includeCache && this . #cacheReader) {
487- return [ this . #cacheReader , ... this . #writerVersions ] ;
487+ return [ ... this . #writerVersions , this . #cacheReader ] ;
488488 }
489489 return this . #writerVersions;
490490 }
You can’t perform that action at this time.
0 commit comments