core
core copied to clipboard
fix(runtime-core): ensure functional component's context parameter is not null. (fix: #6580 )
When funtional component's props has default value, the length of this funtional componet will be 0, which will cause the second paramter to be null, as the issue show. so the solution is always keep the second paramters have value. the same as componet's setup option.
length is a property of a function object, and indicates how many arguments the function expects, i.e. the number of formal parameters. This number excludes the rest parameter and only includes parameters before the first one with a default value. By contrast, arguments.length is local to a function and provides the number of arguments actually passed to the function.
fix #6580