add pageId onto context.pages
This commit is contained in:
parent
9fbf0ded35
commit
03723b3e99
|
|
@ -41,6 +41,7 @@ export type ContextEntry = {
|
|||
};
|
||||
|
||||
export type PageEntry = {
|
||||
pageId: string,
|
||||
screencastFrames: {
|
||||
sha1: string,
|
||||
pageId: string,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ export class TraceModernizer {
|
|||
let pageEntry = this._pageEntries.get(pageId);
|
||||
if (!pageEntry) {
|
||||
pageEntry = {
|
||||
pageId,
|
||||
screencastFrames: [],
|
||||
};
|
||||
this._pageEntries.set(pageId, pageEntry);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ function indexModel(context: ContextEntry) {
|
|||
for (let i = 0; i < context.actions.length; ++i) {
|
||||
const action = context.actions[i] as any;
|
||||
action[contextSymbol] = context;
|
||||
action[pageSymbol] = context.pages.find(page => page.screencastFrames.find(frame => frame.pageId === action.pageId));
|
||||
action[pageSymbol] = context.pages.find(page => page.pageId === action.pageId);
|
||||
}
|
||||
let lastNonRouteAction = undefined;
|
||||
for (let i = context.actions.length - 1; i >= 0; i--) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue