File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ export function memo<P extends object>(
6262
6363// from preact https://github.com/preactjs/preact/blob/4b1a7e9276e04676b8d3f8a8257469e2f732e8d4/compat/src/util.js#L19-L23
6464function objectShallowEqual ( x : object , y : object ) : boolean {
65+ if ( x === y ) {
66+ return true ;
67+ }
6568 for ( const k in x ) {
6669 if ( ! ( k in y ) ) {
6770 return false ;
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ function reconcileNode(
127127 preSlot ,
128128 effectManager
129129 ) ;
130+ // TODO: move bchild placing logic to parent? at least for mutating path?
130131 preSlot = getSlot ( bchild ) ?? preSlot ;
131132 bnode . slot = getSlot ( bchild ) ?? bnode . slot ;
132133 bnode . children [ i ] = bchild ;
@@ -320,6 +321,9 @@ function alignChildrenByKey(
320321// https://github.com/ryansolid/dom-expressions/blob/a2bd455055f5736bb591abe69a5f5b52568b9ea6/packages/babel-plugin-jsx-dom-expressions/src/dom/element.js#L219-L246
321322// https://github.com/ryansolid/dom-expressions/blob/a2bd455055f5736bb591abe69a5f5b52568b9ea6/packages/dom-expressions/src/constants.js#L30-L39
322323function reconcileTagProps ( bnode : BTag , props : Props , oldProps : Props ) {
324+ if ( props === oldProps ) {
325+ return ;
326+ }
323327 for ( const k in oldProps ) {
324328 if ( ! ( k in props ) ) {
325329 setTagProp ( bnode , k , null ) ;
You can’t perform that action at this time.
0 commit comments