Skip to content

Commit 17c9f44

Browse files
committed
remove helper.objDefineNoneEnumerableProps()
1 parent 9810be3 commit 17c9f44

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/com/react-dynamic-tabs/utils/api/api.factory.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ const { throwMissingParam: missingParamEr, throwInvalidParam: invalidParamEr } =
33
export const apiConstructor = function (getDeps, param = { options: {} }) {
44
param.options = param.options || {};
55
const { optionManagerIns, helper, getUserProxy, activedTabsHistoryIns } = getDeps.call(this, param.options);
6-
helper.objDefineNoneEnumerableProps(this, {
7-
optionManager: optionManagerIns,
8-
helper,
9-
activedTabsHistory: activedTabsHistoryIns,
10-
userProxy: getUserProxy(this)
11-
});
6+
this.optionManager = optionManagerIns;
7+
this.helper = helper;
8+
this.activedTabsHistory = activedTabsHistoryIns;
9+
this.userProxy = getUserProxy(this);
1210
this._alterOnChangeCallback()._subscribeCallbacksOptions()._subscribeSelectedTabsHistory();
1311
};
1412
export const apiMethods = {

src/com/react-dynamic-tabs/utils/helper.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
const helper = {};
22
helper.checkArrIndex = (index, arrLength) => index >= 0 && (index < arrLength);
33
helper.getInstance = function (Fn) { new (Function.prototype.bind.apply(Fn, arguments)); };
4-
helper.objDefineNoneEnumerableProps = (function () {
5-
const { defineProperties, entries } = Object;
6-
return (obj, props = {}) =>
7-
defineProperties(obj, entries(props).reduce((acc, [key, value]) => {
8-
acc[key] = { writable: true, value };
9-
return acc;
10-
}, {}))
11-
})();
124
helper.resolve = result => Promise.resolve(result);
135
helper.getCopyState = function (state) {
146
const newState = { ...state };

0 commit comments

Comments
 (0)