mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 11:09:40 +08:00
Merge branch 'master' into design-pass-adm
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"verbose": true,
|
||||
"ignore": ["tests/*", "client/*", "dist/*"]
|
||||
}
|
||||
@@ -37,10 +37,15 @@ export const fetchCommentsByUserId = userId => {
|
||||
const state = getState();
|
||||
comments.forEach(comment => dispatch(addItem(comment, 'comments')));
|
||||
assets.forEach(asset => {
|
||||
const prevAsset = state.items.getIn(['assets', asset.id]);
|
||||
|
||||
// Include data such as hydrated comments from assets already in the system.
|
||||
const prevAsset = state.items.getIn(['assets', asset.id]).toJS();
|
||||
dispatch(addItem({...prevAsset, ...asset}, 'assets'));
|
||||
if (prevAsset) {
|
||||
|
||||
// Include data such as hydrated comments from assets already in the system.
|
||||
dispatch(addItem({...prevAsset.toJS(), ...asset}, 'assets'));
|
||||
} else {
|
||||
dispatch(addItem(asset, 'assets'));
|
||||
}
|
||||
});
|
||||
|
||||
dispatch({type: actions.COMMENTS_BY_USER_SUCCESS, comments: comments.map(comment => comment.id)});
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"start": "./bin/cli serve --jobs",
|
||||
"dev-start": "nodemon --exec \"./bin/cli -c .env serve --jobs\"",
|
||||
"dev-start": "nodemon --config .nodemon.json --exec \"./bin/cli -c .env serve --jobs\"",
|
||||
"build": "NODE_ENV=production webpack --config webpack.config.js --bail",
|
||||
"build-watch": "NODE_ENV=development webpack --config webpack.config.dev.js --watch",
|
||||
"lint": "eslint bin/* .",
|
||||
|
||||
Reference in New Issue
Block a user