@react-fabric/utilities 1.0.0-beta.17 → 1.0.0-beta.19
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/dist/cjs/_getByPath.js +1 -1
- package/dist/esm/_getByPath.js +1 -1
- package/package.json +2 -2
- package/src/_getByPath.ts +3 -3
package/dist/cjs/_getByPath.js
CHANGED
|
@@ -36,7 +36,7 @@ var _get = function _get(hit, field) {
|
|
|
36
36
|
if (_isType.isNil(field)) {
|
|
37
37
|
return hit;
|
|
38
38
|
}
|
|
39
|
-
if (_isType.isObject(hit)) {
|
|
39
|
+
if (_isType.isObject(hit) || _isType.isArray(hit)) {
|
|
40
40
|
/** ***************** return value if object.property is not empty *******************/
|
|
41
41
|
if (!_isType.isNil(hit[field])) {
|
|
42
42
|
return hit[field];
|
package/dist/esm/_getByPath.js
CHANGED
|
@@ -36,7 +36,7 @@ var _get = function _get(hit, field) {
|
|
|
36
36
|
if (isNil(field)) {
|
|
37
37
|
return hit;
|
|
38
38
|
}
|
|
39
|
-
if (isObject(hit)) {
|
|
39
|
+
if (isObject(hit) || isArray(hit)) {
|
|
40
40
|
/** ***************** return value if object.property is not empty *******************/
|
|
41
41
|
if (!isNil(hit[field])) {
|
|
42
42
|
return hit[field];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/utilities",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.19",
|
|
4
4
|
"description": "RUF: Utility package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"node": ">=18.12.0",
|
|
45
45
|
"npm": ">=8.19.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "1757660f7f30590d1bf5c7f2bd3526f6052dccd5"
|
|
48
48
|
}
|
package/src/_getByPath.ts
CHANGED
|
@@ -35,10 +35,10 @@ const _get = (hit: any, field: string): any => {
|
|
|
35
35
|
return hit;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
if (isObject(hit)) {
|
|
38
|
+
if (isObject(hit) || isArray(hit)) {
|
|
39
39
|
/** ***************** return value if object.property is not empty *******************/
|
|
40
|
-
if (!isNil(hit[field])) {
|
|
41
|
-
return hit[field];
|
|
40
|
+
if (!isNil(hit[field as any])) {
|
|
41
|
+
return hit[field as any];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/** ***************** if property name contains `.` separator split to multiple property names *******************/
|