fix bugs introduced by manual initialization

This commit is contained in:
Shawn Erquhart 2018-03-06 17:14:09 -05:00
parent 5e7d71c6e2
commit 3a0929304c
2 changed files with 5 additions and 2 deletions

5
src/bootstrap.js vendored
View File

@ -13,7 +13,10 @@ import 'EditorWidgets';
import 'MarkdownPlugins';
import './index.css';
function bootstrap({ config }) {
function bootstrap(opts = {}) {
const { config } = opts;
/**
* Log the version number.
*/

View File

@ -4,7 +4,7 @@ import { CONFIG_SUCCESS } from 'Actions/config';
const integrations = (state = null, action) => {
switch (action.type) {
case CONFIG_SUCCESS:
const integrations = action.payload.get('integrations').toJS() || [];
const integrations = action.payload.get('integrations', List()).toJS() || [];
const newState = integrations.reduce((acc, integration) => {
const { hooks, collections, provider, ...providerData } = integration;
acc.providers[provider] = { ...providerData };