refactor: remove null comparisons

This commit is contained in:
Evan You
2020-03-18 18:14:51 -04:00
parent 811f28a7d1
commit ba9a91c48c
18 changed files with 104 additions and 119 deletions

View File

@@ -40,7 +40,7 @@ const normalizeSlot = (
ctx: ComponentInternalInstance | null | undefined
): Slot =>
withCtx((props: any) => {
if (__DEV__ && currentInstance != null) {
if (__DEV__ && currentInstance) {
warn(
`Slot "${key}" invoked outside of the render function: ` +
`this will not track dependencies used in the slot. ` +
@@ -80,7 +80,7 @@ export function resolveSlots(
}
}
}
} else if (children !== null) {
} else if (children) {
// non slot object children (direct value) passed to a component
if (__DEV__ && !isKeepAlive(instance.vnode)) {
warn(