@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.amd.js CHANGED
@@ -6317,12 +6317,17 @@ define((function () { 'use strict';
6317
6317
  */
6318
6318
  getReactObj(element) {
6319
6319
  let result = {};
6320
- Object.keys(element).forEach((domPropsName) => {
6320
+ if (element == null) {
6321
+ return result;
6322
+ }
6323
+ const keys = Object.keys(element);
6324
+ keys.forEach((domPropsName) => {
6321
6325
  if (domPropsName.startsWith("__react")) {
6322
- let propsName = domPropsName.replace(/__(.+)\$.+/i, "$1");
6326
+ const propsName = domPropsName.replace(/__(.+)\$.+/i, "$1");
6327
+ const propsValue = Reflect.get(element, domPropsName);
6323
6328
  if (propsName in result) ;
6324
6329
  else {
6325
- result[propsName] = element[domPropsName];
6330
+ Reflect.set(result, propsName, propsValue);
6326
6331
  }
6327
6332
  }
6328
6333
  });