Browse Source

refactor(runetime-core): removed unnecessary condition check (#237)

Sharvilak 6 năm trước cách đây
mục cha
commit
ed5a42e588
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/runtime-core/src/componentRenderUtils.ts

+ 1 - 1
packages/runtime-core/src/componentRenderUtils.ts

@@ -89,7 +89,7 @@ export function shouldUpdateComponent(
       return nextProps !== null
     }
     if (nextProps === null) {
-      return prevProps !== null
+      return true
     }
     return hasPropsChanged(prevProps, nextProps)
   }