浏览代码

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

Sharvilak 6 年之前
父节点
当前提交
ed5a42e588
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)
   }