From 2c51dbe212f4ce3fed125c6c2a687f372606914b Mon Sep 17 00:00:00 2001 From: James Crean Date: Mon, 4 Jun 2018 16:23:57 -0700 Subject: [PATCH] Fixes template prop (#308) * Fixes templates prop * Fix broken test --- .../js/components/PlotInspector/PlotInspectorWrapper.jsx | 2 +- .../components/PlotInspector/PlotInspectorWrapperTest.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/js/components/PlotInspector/PlotInspectorWrapper.jsx b/frontend/src/js/components/PlotInspector/PlotInspectorWrapper.jsx index 3e4594f..f5f75cc 100644 --- a/frontend/src/js/components/PlotInspector/PlotInspectorWrapper.jsx +++ b/frontend/src/js/components/PlotInspector/PlotInspectorWrapper.jsx @@ -175,7 +175,7 @@ const mapStateToProps = (state) => { all_graphics_methods: state.present.graphics_methods, variables: state.present.variables ? Object.keys(state.present.variables) : [], graphics_method_types: state.present.graphics_methods ? Object.keys(state.present.graphics_methods) : [], - templates: state.present.templates.names ? state.present.templates.names : [], + templates: state.present.templates ? state.present.templates : [], } } diff --git a/frontend/test/mocha/components/PlotInspector/PlotInspectorWrapperTest.jsx b/frontend/test/mocha/components/PlotInspector/PlotInspectorWrapperTest.jsx index c0e0281..bb200ce 100644 --- a/frontend/test/mocha/components/PlotInspector/PlotInspectorWrapperTest.jsx +++ b/frontend/test/mocha/components/PlotInspector/PlotInspectorWrapperTest.jsx @@ -189,9 +189,10 @@ describe('PlotInspectorWrapperTest.jsx', function() { variables: { clt: {}, }, - templates: { - names: ["default", "quick"] - }, + templates: [ + "default", + "quick" + ], sheets_model: { selected_cell_id: "0_0_0", sheets: [{