test: fix warning

This commit is contained in:
Evan You 2019-12-09 14:23:01 -05:00
parent 12ec62e688
commit e7e1314ccc

View File

@ -166,7 +166,7 @@ export function createAppAPI<HostNode, HostElement>(
rootProps?: Data | null rootProps?: Data | null
): any { ): any {
if (!isMounted) { if (!isMounted) {
if (!isObject(rootProps)) { if (rootProps != null && !isObject(rootProps)) {
__DEV__ && __DEV__ &&
warn(`root props passed to app.mount() must be an object.`) warn(`root props passed to app.mount() must be an object.`)
rootProps = null rootProps = null