Nikatlas 5 tahun lalu
induk
melakukan
f9cf45eaa1
2 mengubah file dengan 5 tambahan dan 8 penghapusan
  1. 0 0
      dist/lib/systems/CoreSystem.js
  2. 5 8
      lib/systems/CoreSystem.js

File diff ditekan karena terlalu besar
+ 0 - 0
dist/lib/systems/CoreSystem.js


+ 5 - 8
lib/systems/CoreSystem.js

@@ -91,13 +91,10 @@ export default class CoreSystem {
 		let targets = event.path.map(item => findReactElement(item));
 		let resViewNode = null;
 		for (var i in targets) {
-			if(targets[i] !== null){
-				if(targets[i].props && targets[i].props.ID) {
-					resViewNode = targets[i].props.ID;
-					break;
-				}
-			}
-			
+			if(targets[i] && targets[i].ID) {
+				resViewNode = targets[i].ID;
+				break;
+			}		
 		}
 		let ViewID = this.Routing.getCurrentView();
 		return this.ViewSystem.getNode(ViewID, resViewNode);
@@ -113,7 +110,7 @@ export default class CoreSystem {
 const findReactElement = (node) => {
     for (var key in node) {
         if (key.startsWith("__reactInternalInstance$")) {
-            return (node[key]._debugOwner && node[key]._debugOwner.stateNode) || (node[key].stateNode);
+            return (node[key]._debugOwner && node[key]._debugOwner.stateNode.props) || (node[key].stateNode.memoizedProps);
         }
     }
     return null;

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini