Skip to content
Snippets Groups Projects
Commit 4dc2501e authored by Luke Schlangen's avatar Luke Schlangen
Browse files

add empty object to abject assign

parent 4db64ca5
No related branches found
No related tags found
No related merge requests found
......@@ -9,14 +9,15 @@ const initialState = {
hasEverEnteredEditor: true
};
const reducer = function (state = initialState, action) {
const reducer = function (state, action) {
if (typeof state === 'undefined') state = initialState;
switch (action.type) {
case SET_FULL_SCREEN:
return Object.assign(state, {
return Object.assign({}, state, {
isFullScreen: action.isFullScreen
});
case SET_PLAYER:
return Object.assign(state, {
return Object.assign({}, state, {
isPlayerOnly: action.isPlayerOnly,
hasEverEnteredEditor: state.hasEverEnteredEditor || !action.isPlayerOnly
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment