From 8968999e29ee71a44d8bf9eb01e3ae10ecf56c34 Mon Sep 17 00:00:00 2001 From: Ray Alez Date: Tue, 21 Nov 2017 15:51:16 -0800 Subject: [PATCH] Update. --- client/build/client.js | 2 +- client/reducers/habits.reducers.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/build/client.js b/client/build/client.js index e3a36d6..b1e92f8 100644 --- a/client/build/client.js +++ b/client/build/client.js @@ -57410,7 +57410,7 @@ exports.default = function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE; var action = arguments[1]; - var habitList = JSON.parse(JSON.stringify(state.habitList)); /* deep copy */ + var habitList = JSON.parse(JSON.stringify(state.habitList)) || []; /* deep copy */ switch (action.type) { case 'CREATE_HABIT': diff --git a/client/reducers/habits.reducers.js b/client/reducers/habits.reducers.js index 2f6e0c7..8ec33c0 100644 --- a/client/reducers/habits.reducers.js +++ b/client/reducers/habits.reducers.js @@ -117,7 +117,7 @@ INITIAL_STATE = { /* Create and modify state. Passing initial state and actions. */ export default function (state = INITIAL_STATE, action) { - var habitList = JSON.parse(JSON.stringify(state.habitList)) /* deep copy */ + var habitList = JSON.parse(JSON.stringify(state.habitList)) || [] /* deep copy */ switch (action.type) { case 'CREATE_HABIT':