RENAME isInjected to initialState startInjected, state is preserved in preview itself

This commit is contained in:
Norbert de Langen 2020-02-14 13:42:57 +01:00
parent 115e3d01d5
commit 845c1db058
No known key found for this signature in database
GPG Key ID: 976651DA156C2825

View File

@ -27,7 +27,7 @@ export interface InceptionRef {
url: string;
}
export interface RefState {
isInjected: boolean;
startInjected: boolean;
}
export type RefId = string;
@ -113,7 +113,7 @@ const initRefsApi = ({ store, provider }: Module) => {
store.setState({
refs: {
...(store.getState().refs || {}),
[id]: { id, url, data: after, isInjected: true },
[id]: { id, url, data: after, startInjected: true },
},
});
};
@ -125,7 +125,7 @@ const initRefsApi = ({ store, provider }: Module) => {
id: key,
url: value,
data: {},
isInjected: true,
startInjected: true,
},
}),
{} as SubState['refs']