@webitel/ui-sdk 3.2.82 → 3.2.83
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import BaseStoreModule from './BaseStoreModule';
|
|
2
2
|
|
|
3
|
-
const getParentIdFromContext = (
|
|
4
|
-
getters
|
|
3
|
+
const getParentIdFromContext = (context) => (
|
|
4
|
+
context?.getters?.PARENT_ID || context?.state?.parentId
|
|
5
5
|
);
|
|
6
6
|
|
|
7
7
|
export default class ApiStoreModule extends BaseStoreModule {
|
|
@@ -54,8 +54,8 @@ export default class ApiStoreModule extends BaseStoreModule {
|
|
|
54
54
|
if (!api.patch) throw Error('No API "patch" method provided');
|
|
55
55
|
return api.patch({
|
|
56
56
|
...callerContext.state,
|
|
57
|
-
...rest,
|
|
58
57
|
parentId: getParentIdFromContext(callerContext),
|
|
58
|
+
...rest,
|
|
59
59
|
id,
|
|
60
60
|
changes,
|
|
61
61
|
});
|