@kizahasi/flocon-core
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -109,3 +109,7 @@ "use strict"; | ||
const apply = ({ state, operation }) => { | ||
const result = { ...state, ...Piece.apply({ state, operation }) }; | ||
const piece = Piece.apply({ state, operation }); | ||
if (piece.isError) { | ||
return piece; | ||
} | ||
const result = { ...state, ...piece.value }; | ||
if (operation.image != null) { | ||
@@ -128,3 +132,7 @@ result.image = operation.image.newValue; | ||
const applyBack = ({ state, operation }) => { | ||
const result = { ...state, ...Piece.applyBack({ state, operation }) }; | ||
const piece = Piece.applyBack({ state, operation }); | ||
if (piece.isError) { | ||
return piece; | ||
} | ||
const result = { ...state, ...piece.value }; | ||
if (operation.image != null) { | ||
@@ -131,0 +139,0 @@ result.image = operation.image.oldValue; |
{ | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
935199
15733