powr-sdk-web 4.2.7 → 4.2.8

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.
@@ -106,9 +106,9 @@ var PowrBaseComments = function PowrBaseComments(_ref) {
106
106
  _yield$apiCall = _context.v;
107
107
  data = _yield$apiCall.data;
108
108
  ok = _yield$apiCall.ok;
109
- if (ok && data.success) {
110
- if (Array.isArray(data.comments)) {
111
- sortedComments = data.comments.sort(function (a, b) {
109
+ if (ok && data !== null && data !== void 0 && data.success) {
110
+ if (Array.isArray(data === null || data === void 0 ? void 0 : data.data)) {
111
+ sortedComments = data.data.sort(function (a, b) {
112
112
  return new Date(a.createdAt) - new Date(b.createdAt);
113
113
  });
114
114
  setComments(sortedComments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powr-sdk-web",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "babel src -d dist --copy-files",