@twreporter/redux 7.7.0-rc.2 → 7.7.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lib/reducers/entities.js +8 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [7.7.0-rc.3](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/redux@7.7.0-rc.2...@twreporter/redux@7.7.0-rc.3) (2023-07-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **redux:** `politics-and-society` category not shown on index page ([d37560d](https://github.com/twreporter/twreporter-npm-packages/commit/d37560d614a64ee485007517bfbb48d6fcefc53b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [7.7.0-rc.2](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/redux@7.7.0-rc.1...@twreporter/redux@7.7.0-rc.2) (2023-07-04)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @twreporter/redux
|
package/lib/reducers/entities.js
CHANGED
|
@@ -17,6 +17,8 @@ var _get = _interopRequireDefault(require("lodash/get"));
|
|
|
17
17
|
|
|
18
18
|
var _values = _interopRequireDefault(require("lodash/values"));
|
|
19
19
|
|
|
20
|
+
var _snakeCase = _interopRequireDefault(require("lodash/snakeCase"));
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
22
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -31,7 +33,8 @@ var _ = {
|
|
|
31
33
|
concat: _concat["default"],
|
|
32
34
|
forEach: _forEach["default"],
|
|
33
35
|
get: _get["default"],
|
|
34
|
-
values: _values["default"]
|
|
36
|
+
values: _values["default"],
|
|
37
|
+
snakeCase: _snakeCase["default"]
|
|
35
38
|
};
|
|
36
39
|
var defaultState = {
|
|
37
40
|
posts: {
|
|
@@ -117,10 +120,12 @@ function entities() {
|
|
|
117
120
|
var topics = [];
|
|
118
121
|
|
|
119
122
|
_.forEach(fieldKeys, function (fieldKey) {
|
|
120
|
-
var
|
|
123
|
+
var key = _.snakeCase(fieldKey);
|
|
124
|
+
|
|
125
|
+
var entities = _.get(action, ['payload', 'items', key]);
|
|
121
126
|
|
|
122
127
|
if (Array.isArray(entities)) {
|
|
123
|
-
if (
|
|
128
|
+
if (key !== _reduxStateFieldNames["default"].sections.latestTopicSection && key !== _reduxStateFieldNames["default"].sections.topicsSection) {
|
|
124
129
|
posts = _.concat(posts, entities);
|
|
125
130
|
} else {
|
|
126
131
|
topics = _.concat(topics, entities);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/redux",
|
|
3
|
-
"version": "7.7.0-rc.
|
|
3
|
+
"version": "7.7.0-rc.3",
|
|
4
4
|
"description": "redux actions and reducers for twreporter website",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"files": [
|
|
45
45
|
"lib"
|
|
46
46
|
],
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "8a1973f14b54998e4639cb4571fd0f1616a39f2d"
|
|
48
48
|
}
|