Skip to content

Commit

Permalink
Fix missed start -> setup renames (#33967)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover authored and Joel Griffith committed Mar 27, 2019
1 parent 10f60db commit 4574c51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/legacy/server/kbn_server.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type KbnMixinFunc = (kbnServer: KbnServer, server: Server, config: any) => Promi
type Unpromise<T> = T extends Promise<infer U> ? U : T;
export default class KbnServer {
public readonly newPlatform: {
start: {
setup: {
core: {
elasticsearch: ElasticsearchServiceSetup;
};
Expand Down
6 changes: 3 additions & 3 deletions src/legacy/ui/public/new_platform/new_platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ interface CoreSetup {
}

const runtimeContext = {
start: {
setup: {
core: null as CoreSetup | null,
plugins: {},
},
};

export function __newPlatformInit__(core: CoreSetup) {
if (runtimeContext.start.core) {
if (runtimeContext.setup.core) {
throw new Error('New platform core api was already initialized');
}

runtimeContext.start.core = core;
runtimeContext.setup.core = core;
}

export function getNewPlatform() {
Expand Down

0 comments on commit 4574c51

Please sign in to comment.