NOTICKET: Merging OSM/master to OSM/projects
[osm/UI.git] / skyquake / plugins / composer / src / src / components / DetailsPanel.js
index a20679f..e13282e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * 
+ *
  *   Copyright 2016 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,7 +18,7 @@
  */
 'use strict';
 
-import _ from 'lodash'
+import _cloneDeep from 'lodash/cloneDeep'
 import React from 'react';
 import PureRenderMixin from 'react-addons-pure-render-mixin'
 import messages from './messages'
@@ -50,6 +50,10 @@ const DetailsPanel = React.createClass({
        },
        componentWillUnmount() {
        },
+       contextTypes: {
+           router: React.PropTypes.object,
+           userProfile: React.PropTypes.object
+       },
        render() {
                let json = '{}';
                let bodyComponent =  messages.detailsWelcome();
@@ -57,7 +61,7 @@ const DetailsPanel = React.createClass({
                const selectedContainer = selected[0];
                if (selectedContainer) {
                        bodyComponent = <CatalogItemDetailsEditor container={selectedContainer} width={this.props.layout.right} />;
-                       const edit = _.cloneDeep(selectedContainer.model);
+                       const edit = _cloneDeep(selectedContainer.model);
                        json = serializers.serialize(edit) || edit;
                }
                const jsonViewerTitle = selectedContainer ? selectedContainer.model.name : 'nothing selected';