Skip to content

Commit

Permalink
Safely obtain other config ref for karma tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed May 19, 2020
1 parent c8f61f4 commit 0321801
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x-pack/legacy/plugins/maps/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import _ from 'lodash';
import { Plugin, CoreStart, CoreSetup } from 'src/core/public';
// @ts-ignore
import { Start as InspectorStartContract } from 'src/plugins/inspector/public';
Expand Down Expand Up @@ -56,7 +57,7 @@ export class MapsPlugin implements Plugin<MapsPluginSetup, MapsPluginStart> {
});

// @ts-ignore
const config = np.maps.config;
const config = _.get(np, 'maps.config', {});
// @ts-ignore
const kibanaVersion = core.injectedMetadata.getKibanaVersion();
bindNpSetupCoreAndPlugins(core, np, config, kibanaVersion);
Expand Down

0 comments on commit 0321801

Please sign in to comment.