Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
): AppThunkAction => (dispatch, getState) => {
let actionLog = getState().blocks.get('protocol').share.actionLog;
let bid = blockId;
if (type === 'CREATE_BLOCK') {
bid = uuidv4();
data = 'id:' + bid;
}
let actions = actionLog.get(bid);
if (!actions) {
actionLog.set(bid, Y.Array);
actions = actionLog.get(bid);
}
actions.push([{
id: uuidv4(),
time: new Date().getTime(),
user: getState().client.loggedInUser,
blockId: bid,
type: type,
data: objectify(data)
}]);
},
loadBlock: (blockId: string): AppThunkAction => (dispatch, getState) => {