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