@whitesev/utils 2.7.6 → 2.7.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.
package/dist/index.esm.js CHANGED
@@ -6315,12 +6315,17 @@ class Utils {
6315
6315
  */
6316
6316
  getReactObj(element) {
6317
6317
  let result = {};
6318
- Object.keys(element).forEach((domPropsName) => {
6318
+ if (element == null) {
6319
+ return result;
6320
+ }
6321
+ const keys = Object.keys(element);
6322
+ keys.forEach((domPropsName) => {
6319
6323
  if (domPropsName.startsWith("__react")) {
6320
- let propsName = domPropsName.replace(/__(.+)\$.+/i, "$1");
6324
+ const propsName = domPropsName.replace(/__(.+)\$.+/i, "$1");
6325
+ const propsValue = Reflect.get(element, domPropsName);
6321
6326
  if (propsName in result) ;
6322
6327
  else {
6323
- result[propsName] = element[domPropsName];
6328
+ Reflect.set(result, propsName, propsValue);
6324
6329
  }
6325
6330
  }
6326
6331
  });