File tree Expand file tree Collapse file tree 2 files changed +108
-114
lines changed
Expand file tree Collapse file tree 2 files changed +108
-114
lines changed Original file line number Diff line number Diff line change @@ -542,6 +542,7 @@ export class AmpStory extends AMP.BaseElement {
542542 pageEls [ i ] . id = newId ;
543543 pageIds [ i ] = newId ;
544544 }
545+ this . storeService_ . dispatch ( Action . SET_PAGE_IDS , pageIds ) ;
545546 }
546547
547548 /**
@@ -630,18 +631,6 @@ export class AmpStory extends AMP.BaseElement {
630631 */
631632 buildSystemLayer_ ( initialPageId ) {
632633 this . updateAudioIcon_ ( ) ;
633-
634- // TODO(gmajoulet): cache the page ids in the store from the
635- // initializePageIds_ method to remove this block. Requires refactoring in
636- // test-amp-story to avoid console.errors.
637- let pageIds ;
638- if ( this . pages_ . length ) {
639- pageIds = this . pages_ . map ( page => page . element . id ) ;
640- } else {
641- const pages = this . element . querySelectorAll ( 'amp-story-page' ) ;
642- pageIds = Array . prototype . map . call ( pages , el => el . id ) ;
643- }
644- this . storeService_ . dispatch ( Action . SET_PAGE_IDS , pageIds ) ;
645634 this . element . appendChild ( this . systemLayer_ . build ( initialPageId ) ) ;
646635 }
647636
You can’t perform that action at this time.
0 commit comments