@selfcommunity/react-ui 0.10.2-alpha.19 → 0.10.2-alpha.20
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.
|
@@ -177,12 +177,9 @@ function PrivateMessageThread(inProps) {
|
|
|
177
177
|
* Memoized message recipients ids
|
|
178
178
|
*/
|
|
179
179
|
const ids = (0, react_1.useMemo)(() => {
|
|
180
|
-
if (recipients
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
return [parseInt(recipients === null || recipients === void 0 ? void 0 : recipients.id, 10) || recipients];
|
|
180
|
+
if (!recipients)
|
|
181
|
+
return [];
|
|
182
|
+
return Array.isArray(recipients) ? recipients.map((u) => parseInt(u.id, 10)) : [parseInt(recipients.id || recipients, 10)];
|
|
186
183
|
}, [recipients, openNewMessage]);
|
|
187
184
|
function fetchResults() {
|
|
188
185
|
setLoading(true);
|
|
@@ -175,12 +175,9 @@ export default function PrivateMessageThread(inProps) {
|
|
|
175
175
|
* Memoized message recipients ids
|
|
176
176
|
*/
|
|
177
177
|
const ids = useMemo(() => {
|
|
178
|
-
if (recipients
|
|
179
|
-
return
|
|
180
|
-
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
return [parseInt(recipients === null || recipients === void 0 ? void 0 : recipients.id, 10) || recipients];
|
|
178
|
+
if (!recipients)
|
|
179
|
+
return [];
|
|
180
|
+
return Array.isArray(recipients) ? recipients.map((u) => parseInt(u.id, 10)) : [parseInt(recipients.id || recipients, 10)];
|
|
184
181
|
}, [recipients, openNewMessage]);
|
|
185
182
|
function fetchResults() {
|
|
186
183
|
setLoading(true);
|